Skip to content

Commit 6b430c3

Browse files
author
Sinan Nalkaya
committed
Use re-exports from test_internals.
1 parent 09d8ad7 commit 6b430c3

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

library/std/src/io/stdio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1287,4 +1287,4 @@ pub fn _eprint(args: fmt::Arguments<'_>) {
12871287
}
12881288

12891289
#[cfg(test)]
1290-
pub use realstd::io::{_eprint, _print};
1290+
pub use realstd::test_internals::{_eprint, _print};

library/std/src/panicking.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use core::panic::{Location, PanicPayload};
1414
// make sure to use the stderr output configured
1515
// by libtest in the real copy of std
1616
#[cfg(test)]
17-
use realstd::io::try_set_output_capture;
17+
use realstd::test_internals::try_set_output_capture;
1818

1919
use crate::any::Any;
2020
#[cfg(not(test))]
@@ -487,7 +487,7 @@ pub mod panic_count {
487487
}
488488

489489
#[cfg(test)]
490-
pub use realstd::rt::panic_count;
490+
pub use realstd::test_internals::panic_count;
491491

492492
/// Invoke a closure, capturing the cause of an unwinding panic if one occurs.
493493
#[cfg(panic = "immediate-abort")]

library/std/src/test_internals.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/// A collection of common re-exports to be used by the test version of this crate.
2+
pub use crate::io::{_eprint, _print, try_set_output_capture};
3+
pub use crate::rt::panic_count;
24
pub use crate::thread::current::CURRENT as CURRENT_THREAD;
35

46
cfg_select! {

0 commit comments

Comments
 (0)