about summary refs log tree commit diff
path: root/tests/ui/panics/panic-task-name-none.rs
blob: 8695771ff5eaa238c3b581156a917f4b69ecad95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ run-fail
//@ error-pattern:thread '<unnamed>' panicked
//@ error-pattern:test
//@ needs-threads

use std::thread;

fn main() {
    let r: Result<(), _> = thread::spawn(move || {
                               panic!("test");
                           })
                               .join();
    assert!(r.is_ok());
}