Skip to content

Commit a06b205

Browse files
committed
Add public re-exports for benches
1 parent cb5733d commit a06b205

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/libtest/bench.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Benchmarking module.
2+
pub use std::hint::black_box;
3+
24
use super::{
35
event::CompletedTest,
46
helpers::sink::Sink,
@@ -14,7 +16,6 @@ use std::cmp;
1416
use std::io;
1517
use std::panic::{catch_unwind, AssertUnwindSafe};
1618
use std::sync::{Arc, Mutex};
17-
use std::hint::black_box;
1819

1920
/// Manager of the benchmarking runs.
2021
///

src/libtest/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub use self::ColorConfig::*;
3535
pub use self::types::*;
3636
pub use self::types::TestName::*;
3737
pub use self::options::{Options, ShouldPanic};
38+
pub use self::bench::{Bencher, black_box};
3839

3940
// Module to be used by rustc to compile tests in libtest
4041
pub mod test {
@@ -67,6 +68,7 @@ use std::{
6768
};
6869

6970
pub mod stats;
71+
pub mod bench;
7072
mod formatters;
7173
mod cli;
7274
mod console;
@@ -75,7 +77,6 @@ mod helpers;
7577
mod time;
7678
mod types;
7779
mod options;
78-
mod bench;
7980
mod test_result;
8081

8182
#[cfg(test)]

0 commit comments

Comments
 (0)