rust/src/test/ui/unwind-unique.rs
David Koloski ea68758299 Add needs-unwind to tests that depend on panicking
This directive isn't automatically set by compiletest or x.py, but can
be turned on manually for targets that require it.
2021-12-09 22:03:52 +00:00

16 lines
215 B
Rust

// run-pass
// needs-unwind
// ignore-emscripten no threads support
use std::thread;
fn f() {
let _a: Box<_> = Box::new(0);
panic!();
}
pub fn main() {
let t = thread::spawn(f);
drop(t.join());
}