rust/tests/compile-fail/double_panic.rs

12 lines
196 B
Rust

// error-pattern: the evaluated program aborted
struct Foo;
impl Drop for Foo {
fn drop(&mut self) {
panic!("second");
}
}
fn main() {
let _foo = Foo;
panic!("first");
}