about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorsurechen <chenshuo17@huawei.com>2023-11-10 10:11:24 +0800
committersurechen <chenshuo17@huawei.com>2023-12-10 10:56:22 +0800
commit40ae34194c586eea3614d3216322053d2e8e7b37 (patch)
tree2f783001d0356467f126d3420e5b94446fb36fde /compiler/rustc_data_structures/src
parent8cd8d313690260e6cacc280b93710d62d4ffefb0 (diff)
downloadrust-40ae34194c586eea3614d3216322053d2e8e7b37.tar.gz
rust-40ae34194c586eea3614d3216322053d2e8e7b37.zip
remove redundant imports
detects redundant imports that can be eliminated.

for #117772 :

In order to facilitate review and modification, split the checking code and
removing redundant imports code into two PR.
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/fingerprint/tests.rs1
-rw-r--r--compiler/rustc_data_structures/src/graph/implementation/tests.rs1
-rw-r--r--compiler/rustc_data_structures/src/intern/tests.rs1
-rw-r--r--compiler/rustc_data_structures/src/obligation_forest/tests.rs1
-rw-r--r--compiler/rustc_data_structures/src/sip128/tests.rs2
5 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_data_structures/src/fingerprint/tests.rs b/compiler/rustc_data_structures/src/fingerprint/tests.rs
index 09ec2622a65..e04af19abf2 100644
--- a/compiler/rustc_data_structures/src/fingerprint/tests.rs
+++ b/compiler/rustc_data_structures/src/fingerprint/tests.rs
@@ -1,5 +1,4 @@
 use super::*;
-use crate::stable_hasher::Hash64;
 
 // Check that `combine_commutative` is order independent.
 #[test]
diff --git a/compiler/rustc_data_structures/src/graph/implementation/tests.rs b/compiler/rustc_data_structures/src/graph/implementation/tests.rs
index dc1ce1747bf..3ae5f5868f0 100644
--- a/compiler/rustc_data_structures/src/graph/implementation/tests.rs
+++ b/compiler/rustc_data_structures/src/graph/implementation/tests.rs
@@ -1,5 +1,4 @@
 use crate::graph::implementation::*;
-use std::fmt::Debug;
 
 type TestGraph = Graph<&'static str, &'static str>;
 
diff --git a/compiler/rustc_data_structures/src/intern/tests.rs b/compiler/rustc_data_structures/src/intern/tests.rs
index 09810a0850e..a85cd480a09 100644
--- a/compiler/rustc_data_structures/src/intern/tests.rs
+++ b/compiler/rustc_data_structures/src/intern/tests.rs
@@ -1,5 +1,4 @@
 use super::*;
-use std::cmp::Ordering;
 
 #[derive(Debug)]
 struct S(u32);
diff --git a/compiler/rustc_data_structures/src/obligation_forest/tests.rs b/compiler/rustc_data_structures/src/obligation_forest/tests.rs
index bc252f772a1..d09c8e54436 100644
--- a/compiler/rustc_data_structures/src/obligation_forest/tests.rs
+++ b/compiler/rustc_data_structures/src/obligation_forest/tests.rs
@@ -1,7 +1,6 @@
 use super::*;
 
 use std::fmt;
-use std::marker::PhantomData;
 
 impl<'a> super::ForestObligation for &'a str {
     type CacheKey = &'a str;
diff --git a/compiler/rustc_data_structures/src/sip128/tests.rs b/compiler/rustc_data_structures/src/sip128/tests.rs
index cc6d3b0f471..e9dd0f1176b 100644
--- a/compiler/rustc_data_structures/src/sip128/tests.rs
+++ b/compiler/rustc_data_structures/src/sip128/tests.rs
@@ -1,6 +1,6 @@
 use super::*;
 
-use std::hash::{Hash, Hasher};
+use std::hash::Hash;
 
 // Hash just the bytes of the slice, without length prefix
 struct Bytes<'a>(&'a [u8]);