]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/cloudabi/stdio.rs
Refactor stderr_prints_nothing into a more modular function
[rust.git] / src / libstd / sys / cloudabi / stdio.rs
index 1d7344f921c9d564d30bac0c09f86bcf7b682995..c90dbd8beab869ea1cab1ebea50dc511c3a440a6 100644 (file)
@@ -78,6 +78,6 @@ pub fn is_ebadf(err: &io::Error) -> bool {
 
 pub const STDIN_BUF_SIZE: usize = ::sys_common::io::DEFAULT_BUF_SIZE;
 
-pub fn stderr_prints_nothing() -> bool {
-    false
+pub fn panic_output() -> Option<impl io::Write> {
+    Stderr::new().ok()
 }