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.

15 lines
325 B
Rust
Raw Normal View History

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