rust/tests/ui/panics/panic-task-name-none.rs
2024-02-16 20:02:50 +00:00

15 lines
343 B
Rust

//@ run-fail
//@ error-pattern:thread '<unnamed>' panicked
//@ error-pattern:test
//@ ignore-emscripten Needs threads
use std::thread;
fn main() {
let r: Result<(), _> = thread::spawn(move || {
panic!("test");
})
.join();
assert!(r.is_ok());
}