diff options
Diffstat (limited to 'library/test')
-rw-r--r-- | library/test/src/helpers/shuffle.rs | 3 | ||||
-rw-r--r-- | library/test/src/lib.rs | 11 | ||||
-rw-r--r-- | library/test/src/term/terminfo/parm/tests.rs | 2 | ||||
-rw-r--r-- | library/test/src/tests.rs | 17 |
4 files changed, 6 insertions, 27 deletions
diff --git a/library/test/src/helpers/shuffle.rs b/library/test/src/helpers/shuffle.rs index ca503106c..2ac3bfbd4 100644 --- a/library/test/src/helpers/shuffle.rs +++ b/library/test/src/helpers/shuffle.rs @@ -1,7 +1,6 @@ use crate::cli::TestOpts; use crate::types::{TestDescAndFn, TestId, TestName}; -use std::collections::hash_map::DefaultHasher; -use std::hash::Hasher; +use std::hash::{DefaultHasher, Hasher}; use std::time::{SystemTime, UNIX_EPOCH}; pub fn get_shuffle_seed(opts: &TestOpts) -> Option<u64> { diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs index bddf75dff..2fa5a8e5e 100644 --- a/library/test/src/lib.rs +++ b/library/test/src/lib.rs @@ -16,8 +16,8 @@ #![unstable(feature = "test", issue = "50297")] #![doc(test(attr(deny(warnings))))] -#![cfg_attr(not(bootstrap), doc(rust_logo))] -#![cfg_attr(not(bootstrap), feature(rustdoc_internals))] +#![doc(rust_logo)] +#![feature(rustdoc_internals)] #![feature(internal_output_capture)] #![feature(staged_api)] #![feature(process_exitcode_internals)] @@ -264,8 +264,8 @@ pub fn run_tests<F>( where F: FnMut(TestEvent) -> io::Result<()>, { - use std::collections::{self, HashMap}; - use std::hash::BuildHasherDefault; + use std::collections::HashMap; + use std::hash::{BuildHasherDefault, DefaultHasher}; use std::sync::mpsc::RecvTimeoutError; struct RunningTest { @@ -286,8 +286,7 @@ where } // Use a deterministic hasher - type TestMap = - HashMap<TestId, RunningTest, BuildHasherDefault<collections::hash_map::DefaultHasher>>; + type TestMap = HashMap<TestId, RunningTest, BuildHasherDefault<DefaultHasher>>; struct TimeoutEntry { id: TestId, diff --git a/library/test/src/term/terminfo/parm/tests.rs b/library/test/src/term/terminfo/parm/tests.rs index c738f3ba0..e785d84f3 100644 --- a/library/test/src/term/terminfo/parm/tests.rs +++ b/library/test/src/term/terminfo/parm/tests.rs @@ -1,7 +1,5 @@ use super::*; -use std::result::Result::Ok; - #[test] fn test_basic_setabf() { let s = b"\\E[48;5;%p1%dm"; diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs index 4ef18b14f..43a906ad2 100644 --- a/library/test/src/tests.rs +++ b/library/test/src/tests.rs @@ -1,34 +1,17 @@ use super::*; use crate::{ - bench::Bencher, console::OutputLocation, formatters::PrettyFormatter, - options::OutputFormat, test::{ - filter_tests, parse_opts, - run_test, - DynTestFn, - DynTestName, MetricMap, - RunIgnored, - RunStrategy, - ShouldPanic, - StaticTestName, - TestDesc, - TestDescAndFn, - TestOpts, - TrIgnored, - TrOk, // FIXME (introduced by #65251) // ShouldPanic, StaticTestName, TestDesc, TestDescAndFn, TestOpts, TestTimeOptions, // TestType, TrFailedMsg, TrIgnored, TrOk, }, time::{TestTimeOptions, TimeThreshold}, }; -use std::sync::mpsc::channel; -use std::time::Duration; impl TestOpts { fn new() -> TestOpts { |