rust/tests/fail/panic/double_panic.rs

15 lines
331 B
Rust
Raw Normal View History

2020-12-10 12:53:45 -06:00
// error-pattern: the program aborted
2022-05-31 18:00:14 -05:00
// normalize-stderr-test: "\| +\^+" -> "| ^"
// normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
2020-03-21 04:43:59 -05:00
struct Foo;
impl Drop for Foo {
fn drop(&mut self) {
panic!("second");
}
}
fn main() {
let _foo = Foo;
2022-04-30 12:40:35 -05:00
panic!("first");
}