Skip to content

Commit 09c24d9

Browse files
committed
Add panic=unwind test to std_example.rs
1 parent c02a509 commit 09c24d9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

example/std_example.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ use std::io::Write;
1616
use std::ops::Coroutine;
1717

1818
fn main() {
19-
println!("{:?}", std::env::args().collect::<Vec<_>>());
19+
println!(
20+
"{:?}",
21+
std::panic::catch_unwind(|| {
22+
panic!("foo");
23+
})
24+
);
2025

2126
let mutex = std::sync::Mutex::new(());
2227
let _guard = mutex.lock().unwrap();

0 commit comments

Comments
 (0)