Skip to content

Commit

Permalink
Rollup merge of #111950 - cjgillot:expn-noinline, r=oli-obk
Browse files Browse the repository at this point in the history
Remove ExpnKind::Inlined.

Suggested in rust-lang/rust#111815 (comment)

r? ``@oli-obk``
  • Loading branch information
compiler-errors authored May 25, 2023
2 parents f0173ad + 5a95557 commit 0c07f65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/fail/terminate-terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ impl Drop for Foo {

#[inline(always)]
fn has_cleanup() {
//~^ ERROR: panic in a function that cannot unwind
let _f = Foo;
panic!();
}

extern "C" fn panic_abort() {
has_cleanup();
//~^ ERROR: panic in a function that cannot unwind
}

fn main() {
Expand Down
11 changes: 7 additions & 4 deletions tests/fail/terminate-terminator.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ error: abnormal termination: panic in a function that cannot unwind
--> $DIR/terminate-terminator.rs:LL:CC
|
LL | / fn has_cleanup() {
LL | |
LL | | let _f = Foo;
LL | | panic!();
LL | | }
| |_^ panic in a function that cannot unwind
...
LL | has_cleanup();
| ------------- in this inlined function call
|
= note: inside `panic_abort` at $DIR/terminate-terminator.rs:LL:CC
= note: inside `has_cleanup` at $DIR/terminate-terminator.rs:LL:CC
note: inside `panic_abort`
--> $DIR/terminate-terminator.rs:LL:CC
|
LL | has_cleanup();
| ^^^^^^^^^^^^^
note: inside `main`
--> $DIR/terminate-terminator.rs:LL:CC
|
Expand Down

0 comments on commit 0c07f65

Please sign in to comment.