mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
19 lines
459 B
Rust
19 lines
459 B
Rust
// run-fail
|
|
// error-pattern:thread 'owned name' panicked at 'test'
|
|
// ignore-emscripten Needs threads.
|
|
|
|
use std::thread::Builder;
|
|
|
|
fn main() {
|
|
let r: () = Builder::new()
|
|
.name("owned name".to_string())
|
|
.spawn(move || {
|
|
panic!("test");
|
|
()
|
|
})
|
|
.unwrap()
|
|
.join()
|
|
.unwrap();
|
|
panic!();
|
|
}
|