Skip to content

Commit 83339bf

Browse files
committed
add a regression test
1 parent af2ce8b commit 83339bf

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

Diff for: tests/crashes/128097.rs

-6
This file was deleted.

Diff for: tests/ui/explicit-tail-calls/two-phase.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// regression test for <https://github.com/rust-lang/rust/issues/112788>.
2+
// this test used to ICE because we tried to run drop glue of `x`
3+
// if dropping `_y` (happening at the `become` site) panicked and caused an unwind.
4+
//
5+
//@ check-pass
6+
#![expect(incomplete_features)]
7+
#![feature(explicit_tail_calls)]
8+
9+
fn f(x: &mut ()) {
10+
let _y = String::new();
11+
become f(x);
12+
}
13+
14+
fn main() {}

0 commit comments

Comments
 (0)