rust/tests/fail/panic/double_panic.rs

15 lines
331 B
Rust
Raw Normal View History

//@error-pattern: the program aborted
//@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");
}