about summary refs log tree commit diff
path: root/src/libtest
diff options
context:
space:
mode:
authorIgor Aleksanov <popzxc@yandex.ru>2019-10-18 08:32:44 +0300
committerIgor Aleksanov <popzxc@yandex.ru>2019-10-18 08:32:44 +0300
commita06b205177e714fc68fec2a2b0efe5b57d4eb865 (patch)
tree52150a35029bf166159bd92a94b056e00844ad7a /src/libtest
parentcb5733de868600aab889730effe4077641a46981 (diff)
downloadrust-a06b205177e714fc68fec2a2b0efe5b57d4eb865.tar.gz
rust-a06b205177e714fc68fec2a2b0efe5b57d4eb865.zip
Add public re-exports for benches
Diffstat (limited to 'src/libtest')
-rw-r--r--src/libtest/bench.rs3
-rw-r--r--src/libtest/lib.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libtest/bench.rs b/src/libtest/bench.rs
index bb5b0d1da53..c142c5213d2 100644
--- a/src/libtest/bench.rs
+++ b/src/libtest/bench.rs
@@ -1,4 +1,6 @@
 //! Benchmarking module.
+pub use std::hint::black_box;
+
 use super::{
     event::CompletedTest,
     helpers::sink::Sink,
@@ -14,7 +16,6 @@ use std::cmp;
 use std::io;
 use std::panic::{catch_unwind, AssertUnwindSafe};
 use std::sync::{Arc, Mutex};
-use std::hint::black_box;
 
 /// Manager of the benchmarking runs.
 ///
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 89f527b6bd7..179558e8f9a 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -35,6 +35,7 @@ pub use self::ColorConfig::*;
 pub use self::types::*;
 pub use self::types::TestName::*;
 pub use self::options::{Options, ShouldPanic};
+pub use self::bench::{Bencher, black_box};
 
 // Module to be used by rustc to compile tests in libtest
 pub mod test {
@@ -67,6 +68,7 @@ use std::{
 };
 
 pub mod stats;
+pub mod bench;
 mod formatters;
 mod cli;
 mod console;
@@ -75,7 +77,6 @@ mod helpers;
 mod time;
 mod types;
 mod options;
-mod bench;
 mod test_result;
 
 #[cfg(test)]