2024-02-16 20:02:50 +00:00
|
|
|
//@ run-fail
|
|
|
|
//@ error-pattern:thread '<unnamed>' panicked
|
|
|
|
//@ error-pattern:test
|
2024-03-06 12:19:20 -08:00
|
|
|
//@ needs-threads
|
2013-10-05 21:01:58 +02:00
|
|
|
|
2015-02-17 15:10:25 -08:00
|
|
|
use std::thread;
|
2013-11-21 16:55:40 -08:00
|
|
|
|
2013-10-05 21:01:58 +02:00
|
|
|
fn main() {
|
2016-05-27 08:09:36 +05:30
|
|
|
let r: Result<(), _> = thread::spawn(move || {
|
|
|
|
panic!("test");
|
|
|
|
})
|
|
|
|
.join();
|
2014-06-25 18:18:13 -07:00
|
|
|
assert!(r.is_ok());
|
2013-10-05 21:01:58 +02:00
|
|
|
}
|