mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
14 lines
327 B
Rust
14 lines
327 B
Rust
// run-fail
|
|
// error-pattern:thread '<unnamed>' panicked at 'test'
|
|
// ignore-emscripten Needs threads
|
|
|
|
use std::thread;
|
|
|
|
fn main() {
|
|
let r: Result<(), _> = thread::spawn(move || {
|
|
panic!("test");
|
|
})
|
|
.join();
|
|
assert!(r.is_ok());
|
|
}
|