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

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