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 14:50:32 +08:00
// run-fail
// error-pattern:thread 'owned name' panicked
// error-pattern:test
// ignore-emscripten Needs threads.
use std::thread::Builder;
fn main() {
2016-05-27 10:39:36 +08:00
let r: () = Builder::new()
.name("owned name".to_string())
.spawn(move || {
panic!("test");
()
})
.unwrap()
.join()
.unwrap();
2015-02-18 07:24:34 +08:00
panic!();
}