2020-04-16 01:50:32 -05:00
|
|
|
// run-fail
|
2023-06-20 12:16:18 -05:00
|
|
|
// error-pattern:thread 'owned name' panicked
|
|
|
|
// error-pattern:test
|
2016-09-05 19:00:09 -05:00
|
|
|
// ignore-emscripten Needs threads.
|
2013-10-05 14:01:58 -05:00
|
|
|
|
2014-12-14 02:05:32 -06:00
|
|
|
use std::thread::Builder;
|
2013-11-21 18:55:40 -06:00
|
|
|
|
2013-10-05 14:01:58 -05:00
|
|
|
fn main() {
|
2016-05-26 21:39:36 -05:00
|
|
|
let r: () = Builder::new()
|
|
|
|
.name("owned name".to_string())
|
|
|
|
.spawn(move || {
|
|
|
|
panic!("test");
|
|
|
|
()
|
|
|
|
})
|
|
|
|
.unwrap()
|
|
|
|
.join()
|
|
|
|
.unwrap();
|
2015-02-17 17:24:34 -06:00
|
|
|
panic!();
|
2013-10-05 14:01:58 -05:00
|
|
|
}
|