granite-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 15:50:32 +09:00
// run-fail
// error-pattern:thread '<unnamed>' panicked at 'test'
// ignore-emscripten Needs threads
2015-02-17 15:10:25 -08:00
use std::thread;
fn main() {
2016-05-27 08:09:36 +05:30
let r: Result<(), _> = thread::spawn(move || {
panic!("test");
})
.join();
assert!(r.is_ok());
}