rust/tests/compile-fail/panic/double_panic.rs

13 lines
185 B
Rust
Raw Normal View History

2020-12-10 19:53:45 +01:00
// error-pattern: the program aborted
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");
}