about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mod.rs3
-rw-r--r--src/libstd/io/stdio.rs8
-rw-r--r--src/libstd/sys/redox/stdio.rs2
-rw-r--r--src/libstd/sys/unix/stdio.rs2
-rw-r--r--src/libstd/sys/wasm/stdio.rs2
-rw-r--r--src/libstd/sys/windows/stdio.rs2
6 files changed, 6 insertions, 13 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 4fd114884e3..c0570ae60a1 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -286,9 +286,6 @@ pub use self::stdio::{_print, _eprint};
 #[doc(no_inline, hidden)]
 pub use self::stdio::{set_panic, set_print};
 
-// Used inside the standard library for panic output.
-pub(crate) use self::stdio::stderr_raw;
-
 pub mod prelude;
 mod buffered;
 mod cursor;
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs
index 4fc11db3ff5..4068c0f9c7d 100644
--- a/src/libstd/io/stdio.rs
+++ b/src/libstd/io/stdio.rs
@@ -32,9 +32,7 @@ struct StdoutRaw(stdio::Stdout);
 ///
 /// This handle is not synchronized or buffered in any fashion. Constructed via
 /// the `std::io::stdio::stderr_raw` function.
-///
-/// Not exposed, but used inside the standard library for panic output.
-pub(crate) struct StderrRaw(stdio::Stderr);
+struct StderrRaw(stdio::Stderr);
 
 /// Constructs a new raw handle to the standard input of this process.
 ///
@@ -63,9 +61,7 @@ fn stdout_raw() -> io::Result<StdoutRaw> { stdio::Stdout::new().map(StdoutRaw) }
 ///
 /// The returned handle has no external synchronization or buffering layered on
 /// top.
-///
-/// Not exposed, but used inside the standard library for panic output.
-pub(crate) fn stderr_raw() -> io::Result<StderrRaw> { stdio::Stderr::new().map(StderrRaw) }
+fn stderr_raw() -> io::Result<StderrRaw> { stdio::Stderr::new().map(StderrRaw) }
 
 impl Read for StdinRaw {
     fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { self.0.read(buf) }
diff --git a/src/libstd/sys/redox/stdio.rs b/src/libstd/sys/redox/stdio.rs
index b4eb01fd6cc..8571b38cefa 100644
--- a/src/libstd/sys/redox/stdio.rs
+++ b/src/libstd/sys/redox/stdio.rs
@@ -60,5 +60,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
 pub const STDIN_BUF_SIZE: usize = ::sys_common::io::DEFAULT_BUF_SIZE;
 
 pub fn panic_output() -> Option<impl io::Write> {
-    io::stderr_raw().ok()
+    Stderr::new().ok()
 }
diff --git a/src/libstd/sys/unix/stdio.rs b/src/libstd/sys/unix/stdio.rs
index 82bd2fbf776..56b75bf9f79 100644
--- a/src/libstd/sys/unix/stdio.rs
+++ b/src/libstd/sys/unix/stdio.rs
@@ -60,5 +60,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
 pub const STDIN_BUF_SIZE: usize = ::sys_common::io::DEFAULT_BUF_SIZE;
 
 pub fn panic_output() -> Option<impl io::Write> {
-    io::stderr_raw().ok()
+    Stderr::new().ok()
 }
diff --git a/src/libstd/sys/wasm/stdio.rs b/src/libstd/sys/wasm/stdio.rs
index 657655004e9..d7540fd815c 100644
--- a/src/libstd/sys/wasm/stdio.rs
+++ b/src/libstd/sys/wasm/stdio.rs
@@ -59,7 +59,7 @@ pub fn is_ebadf(_err: &io::Error) -> bool {
 
 pub fn panic_output() -> Option<impl io::Write> {
     if cfg!(feature = "wasm_syscall") {
-        io::stderr_raw().ok()
+        Stderr::new().ok()
     } else {
         None
     }
diff --git a/src/libstd/sys/windows/stdio.rs b/src/libstd/sys/windows/stdio.rs
index 5963541a893..99445f4e0d4 100644
--- a/src/libstd/sys/windows/stdio.rs
+++ b/src/libstd/sys/windows/stdio.rs
@@ -279,5 +279,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
 }
 
 pub fn panic_output() -> Option<impl io::Write> {
-    io::stderr_raw().ok()
+    Stderr::new().ok()
 }