rust/tests/ui/panics/panic-task-name-none.rs
2023-01-11 09:32:08 +00:00

14 lines
327 B
Rust

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