rust/tests/fail/panic/double_panic.rs

15 lines
331 B
Rust
Raw Normal View History

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