about summary refs log tree commit diff
path: root/compiler/rustc_errors/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_errors/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_errors/src')
-rw-r--r--compiler/rustc_errors/src/json/tests.rs9
-rw-r--r--compiler/rustc_errors/src/markdown/tests/term.rs1
2 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_errors/src/json/tests.rs b/compiler/rustc_errors/src/json/tests.rs
index 1f9a2981e02..5f9e821a48c 100644
--- a/compiler/rustc_errors/src/json/tests.rs
+++ b/compiler/rustc_errors/src/json/tests.rs
@@ -1,11 +1,8 @@
 use super::*;
 
-use crate::json::JsonEmitter;
-use rustc_span::source_map::{FilePathMapping, SourceMap};
-
-use crate::emitter::{ColorConfig, HumanReadableErrorType};
-use crate::{Handler, TerminalUrl};
-use rustc_span::{BytePos, Span};
+use crate::emitter::ColorConfig;
+use crate::Handler;
+use rustc_span::BytePos;
 
 use std::str;
 
diff --git a/compiler/rustc_errors/src/markdown/tests/term.rs b/compiler/rustc_errors/src/markdown/tests/term.rs
index 6f68fb25a58..a0d956bf0cd 100644
--- a/compiler/rustc_errors/src/markdown/tests/term.rs
+++ b/compiler/rustc_errors/src/markdown/tests/term.rs
@@ -3,7 +3,6 @@ use std::path::PathBuf;
 use termcolor::{BufferWriter, ColorChoice};
 
 use super::*;
-use crate::markdown::MdStream;
 
 const INPUT: &str = include_str!("input.md");
 const OUTPUT_PATH: &[&str] = &[env!("CARGO_MANIFEST_DIR"), "src","markdown","tests","output.stdout"];