rust/tests/ui/panics/panic-task-name-none.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
327 B
Rust
Raw Normal View History

2020-04-16 01:50:32 -05:00
// run-fail
// error-pattern:thread '<unnamed>' panicked at 'test'
// ignore-emscripten Needs threads
2015-02-17 17:10:25 -06:00
use std::thread;
fn main() {
2016-05-26 21:39:36 -05:00
let r: Result<(), _> = thread::spawn(move || {
panic!("test");
})
.join();
assert!(r.is_ok());
}