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

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

20 lines
471 B
Rust
Raw Normal View History

2020-04-16 01:50:32 -05:00
// run-fail
// error-pattern:thread 'owned name' panicked
// error-pattern:test
// ignore-emscripten Needs threads.
use std::thread::Builder;
fn main() {
2016-05-26 21:39:36 -05:00
let r: () = Builder::new()
.name("owned name".to_string())
.spawn(move || {
panic!("test");
()
})
.unwrap()
.join()
.unwrap();
2015-02-17 17:24:34 -06:00
panic!();
}