add a regression test
This commit is contained in:
parent
af2ce8b702
commit
83339bf372
2 changed files with 14 additions and 6 deletions
|
|
@ -1,6 +0,0 @@
|
|||
//@ known-bug: #128097
|
||||
#![feature(explicit_tail_calls)]
|
||||
fn f(x: &mut ()) {
|
||||
let _y: String;
|
||||
become f(x);
|
||||
}
|
||||
14
tests/ui/explicit-tail-calls/two-phase.rs
Normal file
14
tests/ui/explicit-tail-calls/two-phase.rs
Normal file
|
|
@ -0,0 +1,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() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue