summaryrefslogtreecommitdiffstats
path: root/tests/ui/panics/panic-task-name-owned.rs
blob: d5274ebbc4b4d0f67f4753359e252f38fa5a4412 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// run-fail
// error-pattern:thread 'owned name' panicked
// error-pattern: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!();
}