about summary refs log tree commit diff
path: root/tests/ui/explicit-tail-calls/two-phase.rs
blob: 91365b5e739c627144a791333b5ec7a42adc9f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// regression test for <https://github.com/rust-lang/rust/issues/112788>.
// this test used to ICE because we tried to run drop glue of `x`
// if dropping `_y` (happening at the `become` site) panicked and caused an unwind.
//
//@ check-pass
#![expect(incomplete_features)]
#![feature(explicit_tail_calls)]

fn f(x: &mut ()) {
    let _y = String::new();
    become f(x);
}

fn main() {}