rust/tests/fail/panic/double_panic.rs
2022-06-01 10:53:38 -04:00

15 lines
331 B
Rust

// error-pattern: the program aborted
// normalize-stderr-test: "\| +\^+" -> "| ^"
// normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
struct Foo;
impl Drop for Foo {
fn drop(&mut self) {
panic!("second");
}
}
fn main() {
let _foo = Foo;
panic!("first");
}