Skip to content

Commit a654063

Browse files
committed
Feedback
1 parent 1183c87 commit a654063

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

compiler/rustc_mir_transform/src/panic_entrypoints.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
//! This pass implements a part of the MIR semantics: when invoking a function with the
2+
//! `#[rustc_panic_entrypoint]` attribute, if the current panic strategy is immediate-abort,
3+
//! instead of executing the function body we just abort the program.
4+
15
use rustc_hir::LangItem;
26
use rustc_middle::mir::{Const, ConstValue, UnwindAction, *};
37
use rustc_middle::ty::{self, InstanceKind, Ty, TyCtxt};

src/tools/miri/tests/fail/immediate-abort.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,12 @@
1111
#![allow(internal_features)]
1212

1313
#[lang = "pointee_sized"]
14-
#[diagnostic::on_unimplemented(
15-
message = "values of type `{Self}` may or may not have a size",
16-
label = "may or may not have a known size"
17-
)]
1814
pub trait PointeeSized {}
1915

2016
#[lang = "meta_sized"]
21-
#[diagnostic::on_unimplemented(
22-
message = "the size for values of type `{Self}` cannot be known",
23-
label = "doesn't have a known size"
24-
)]
2517
pub trait MetaSized: PointeeSized {}
2618

2719
#[lang = "sized"]
28-
#[diagnostic::on_unimplemented(
29-
message = "the size for values of type `{Self}` cannot be known at compilation time",
30-
label = "doesn't have a size known at compile-time"
31-
)]
3220
pub trait Sized: MetaSized {}
3321

3422
#[rustc_nounwind]

0 commit comments

Comments
 (0)