We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e8e8ab commit a51cd61Copy full SHA for a51cd61
src/libstd/io/stdio.rs
@@ -402,3 +402,29 @@ pub fn _print(args: fmt::Arguments) {
402
panic!("failed printing to stdout: {}", e);
403
}
404
405
+
406
+#[cfg(test)]
407
+mod test {
408
+ use thread;
409
+ use super::*;
410
411
+ #[test]
412
+ fn panic_doesnt_poison() {
413
+ thread::spawn(|| {
414
+ let _a = stdin();
415
+ let _a = _a.lock();
416
+ let _a = stdout();
417
418
+ let _a = stderr();
419
420
+ panic!();
421
+ }).join().unwrap_err();
422
423
424
425
426
427
428
429
+ }
430
+}
0 commit comments