Skip to content

Commit 1a944b0

Browse files
committed
Remove pub(crate) from stderr_raw
1 parent 6464e32 commit 1a944b0

File tree

6 files changed

+6
-13
lines changed

6 files changed

+6
-13
lines changed

src/libstd/io/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,6 @@ pub use self::stdio::{_print, _eprint};
286286
#[doc(no_inline, hidden)]
287287
pub use self::stdio::{set_panic, set_print};
288288

289-
// Used inside the standard library for panic output.
290-
pub(crate) use self::stdio::stderr_raw;
291-
292289
pub mod prelude;
293290
mod buffered;
294291
mod cursor;

src/libstd/io/stdio.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ struct StdoutRaw(stdio::Stdout);
3232
///
3333
/// This handle is not synchronized or buffered in any fashion. Constructed via
3434
/// the `std::io::stdio::stderr_raw` function.
35-
///
36-
/// Not exposed, but used inside the standard library for panic output.
37-
pub(crate) struct StderrRaw(stdio::Stderr);
35+
struct StderrRaw(stdio::Stderr);
3836

3937
/// Constructs a new raw handle to the standard input of this process.
4038
///
@@ -63,9 +61,7 @@ fn stdout_raw() -> io::Result<StdoutRaw> { stdio::Stdout::new().map(StdoutRaw) }
6361
///
6462
/// The returned handle has no external synchronization or buffering layered on
6563
/// top.
66-
///
67-
/// Not exposed, but used inside the standard library for panic output.
68-
pub(crate) fn stderr_raw() -> io::Result<StderrRaw> { stdio::Stderr::new().map(StderrRaw) }
64+
fn stderr_raw() -> io::Result<StderrRaw> { stdio::Stderr::new().map(StderrRaw) }
6965

7066
impl Read for StdinRaw {
7167
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { self.0.read(buf) }

src/libstd/sys/redox/stdio.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
6060
pub const STDIN_BUF_SIZE: usize = ::sys_common::io::DEFAULT_BUF_SIZE;
6161

6262
pub fn panic_output() -> Option<impl io::Write> {
63-
io::stderr_raw().ok()
63+
Stderr::new().ok()
6464
}

src/libstd/sys/unix/stdio.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
6060
pub const STDIN_BUF_SIZE: usize = ::sys_common::io::DEFAULT_BUF_SIZE;
6161

6262
pub fn panic_output() -> Option<impl io::Write> {
63-
io::stderr_raw().ok()
63+
Stderr::new().ok()
6464
}

src/libstd/sys/wasm/stdio.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub fn is_ebadf(_err: &io::Error) -> bool {
5959

6060
pub fn panic_output() -> Option<impl io::Write> {
6161
if cfg!(feature = "wasm_syscall") {
62-
io::stderr_raw().ok()
62+
Stderr::new().ok()
6363
} else {
6464
None
6565
}

src/libstd/sys/windows/stdio.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,5 +279,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
279279
}
280280

281281
pub fn panic_output() -> Option<impl io::Write> {
282-
io::stderr_raw().ok()
282+
Stderr::new().ok()
283283
}

0 commit comments

Comments
 (0)