rust/tests/compile-fail/panic/double_panic.rs
2020-03-21 10:54:56 +01:00

14 lines
244 B
Rust

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