summaryrefslogtreecommitdiffstats
path: root/library/test/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
commit018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch)
treea835ebdf2088ef88fa681f8fad45f09922c1ae9a /library/test/src
parentAdding debian version 1.75.0+dfsg1-5. (diff)
downloadrustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz
rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/test/src')
-rw-r--r--library/test/src/helpers/shuffle.rs3
-rw-r--r--library/test/src/lib.rs11
-rw-r--r--library/test/src/term/terminfo/parm/tests.rs2
-rw-r--r--library/test/src/tests.rs17
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 {