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

13 lines
185 B
Rust
Raw Normal View History

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