]> git.lizzy.rs Git - rust.git/blob - src/test/ui/panics/panic-task-name-owned.rs
Rollup merge of #89468 - FabianWolff:issue-89358, r=jackh726
[rust.git] / src / test / ui / panics / panic-task-name-owned.rs
1 // run-fail
2 // error-pattern:thread 'owned name' panicked at 'test'
3 // ignore-emscripten Needs threads.
4
5 use std::thread::Builder;
6
7 fn main() {
8     let r: () = Builder::new()
9                     .name("owned name".to_string())
10                     .spawn(move || {
11                         panic!("test");
12                         ()
13                     })
14                     .unwrap()
15                     .join()
16                     .unwrap();
17     panic!();
18 }