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
456 B
Rust
Raw Normal View History

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