Skip to content

Commit 40ae341

Browse files
committed
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.
1 parent 8cd8d31 commit 40ae341

File tree

283 files changed

+140
-510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+140
-510
lines changed

compiler/rustc_ast/src/mut_visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
//! a `MutVisitor` renaming item names in a module will miss all of those
88
//! that are created by the expansion of a macro.
99
10+
use crate::ast::*;
1011
use crate::ptr::P;
1112
use crate::token::{self, Token};
1213
use crate::tokenstream::*;
13-
use crate::{ast::*, StaticItem};
1414

1515
use rustc_data_structures::flat_map_in_place::FlatMapInPlace;
1616
use rustc_data_structures::stack::ensure_sufficient_stack;

compiler/rustc_ast/src/token.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc_macros::HashStable_Generic;
1313
use rustc_span::symbol::{kw, sym};
1414
#[allow(hidden_glob_reexports)]
1515
use rustc_span::symbol::{Ident, Symbol};
16-
use rustc_span::{self, edition::Edition, Span, DUMMY_SP};
16+
use rustc_span::{edition::Edition, Span, DUMMY_SP};
1717
use std::borrow::Cow;
1818
use std::fmt;
1919

compiler/rustc_ast/src/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! instance, a walker looking for item names in a module will miss all of
1414
//! those that are created by the expansion of a macro.
1515
16-
use crate::{ast::*, StaticItem};
16+
use crate::ast::*;
1717

1818
use rustc_span::symbol::Ident;
1919
use rustc_span::Span;

compiler/rustc_ast_lowering/src/expr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use super::errors::{
88
use super::ResolverAstLoweringExt;
99
use super::{ImplTraitContext, LoweringContext, ParamMode, ParenthesizedGenericArgs};
1010
use crate::{FnDeclKind, ImplTraitPosition};
11-
use rustc_ast::attr;
1211
use rustc_ast::ptr::P as AstP;
1312
use rustc_ast::*;
1413
use rustc_data_structures::stack::ensure_sufficient_stack;

compiler/rustc_ast_lowering/src/format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::LoweringContext;
22
use rustc_ast as ast;
3-
use rustc_ast::visit::{self, Visitor};
3+
use rustc_ast::visit::Visitor;
44
use rustc_ast::*;
55
use rustc_data_structures::fx::FxIndexMap;
66
use rustc_hir as hir;

compiler/rustc_ast_lowering/src/index.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use rustc_data_structures::fx::FxHashMap;
22
use rustc_data_structures::sorted_map::SortedMap;
33
use rustc_hir as hir;
44
use rustc_hir::def_id::LocalDefId;
5-
use rustc_hir::intravisit::{self, Visitor};
5+
use rustc_hir::intravisit::Visitor;
66
use rustc_hir::*;
77
use rustc_index::{Idx, IndexVec};
88
use rustc_middle::span_bug;

compiler/rustc_ast_lowering/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ extern crate tracing;
4545
use crate::errors::{AssocTyParentheses, AssocTyParenthesesSub, MisplacedImplTrait};
4646

4747
use rustc_ast::ptr::P;
48-
use rustc_ast::visit;
4948
use rustc_ast::{self as ast, *};
5049
use rustc_ast_pretty::pprust;
5150
use rustc_data_structures::captures::Captures;

compiler/rustc_ast_passes/src/ast_validation.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
use itertools::{Either, Itertools};
1010
use rustc_ast::ptr::P;
11-
use rustc_ast::visit::{self, AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor};
11+
use rustc_ast::visit::{AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor};
12+
use rustc_ast::walk_list;
1213
use rustc_ast::*;
13-
use rustc_ast::{walk_list, StaticItem};
1414
use rustc_ast_pretty::pprust::{self, State};
1515
use rustc_data_structures::fx::FxIndexMap;
1616
use rustc_feature::Features;

compiler/rustc_borrowck/src/dataflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_middle::ty::RegionVid;
1010
use rustc_middle::ty::TyCtxt;
1111
use rustc_mir_dataflow::impls::{EverInitializedPlaces, MaybeUninitializedPlaces};
1212
use rustc_mir_dataflow::ResultsVisitable;
13-
use rustc_mir_dataflow::{self, fmt::DebugWithContext, GenKill};
13+
use rustc_mir_dataflow::{fmt::DebugWithContext, GenKill};
1414
use rustc_mir_dataflow::{Analysis, AnalysisDomain, Results};
1515
use std::fmt;
1616

compiler/rustc_borrowck/src/region_infer/graphviz.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use std::borrow::Cow;
88
use std::io::{self, Write};
99

1010
use super::*;
11-
use crate::constraints::OutlivesConstraint;
1211
use rustc_graphviz as dot;
1312

1413
impl<'tcx> RegionInferenceContext<'tcx> {

compiler/rustc_borrowck/src/type_check/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use rustc_infer::infer::{
2424
};
2525
use rustc_middle::mir::tcx::PlaceTy;
2626
use rustc_middle::mir::visit::{NonMutatingUseContext, PlaceContext, Visitor};
27-
use rustc_middle::mir::AssertKind;
2827
use rustc_middle::mir::*;
2928
use rustc_middle::traits::query::NoSolution;
3029
use rustc_middle::traits::ObligationCause;

compiler/rustc_builtin_macros/src/source_util.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ use rustc_ast::tokenstream::TokenStream;
55
use rustc_ast_pretty::pprust;
66
use rustc_expand::base::{self, *};
77
use rustc_expand::module::DirOwnership;
8+
use rustc_parse::new_parser_from_file;
89
use rustc_parse::parser::{ForceCollect, Parser};
9-
use rustc_parse::{self, new_parser_from_file};
1010
use rustc_session::lint::builtin::INCOMPLETE_INCLUDE;
1111
use rustc_span::symbol::Symbol;
12-
use rustc_span::{self, Pos, Span};
12+
use rustc_span::{Pos, Span};
1313

1414
use smallvec::SmallVec;
1515
use std::rc::Rc;

compiler/rustc_builtin_macros/src/test_harness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use rustc_ast as ast;
44
use rustc_ast::entry::EntryPointType;
5-
use rustc_ast::mut_visit::{ExpectOne, *};
5+
use rustc_ast::mut_visit::*;
66
use rustc_ast::ptr::P;
77
use rustc_ast::visit::{walk_item, Visitor};
88
use rustc_ast::{attr, ModKind};

compiler/rustc_codegen_cranelift/src/abi/comments.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
use std::borrow::Cow;
55

6-
use rustc_middle::mir;
76
use rustc_target::abi::call::PassMode;
87

98
use crate::prelude::*;

compiler/rustc_codegen_cranelift/src/abi/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod returning;
66

77
use std::borrow::Cow;
88

9-
use cranelift_codegen::ir::{AbiParam, SigRef};
9+
use cranelift_codegen::ir::SigRef;
1010
use cranelift_module::ModuleError;
1111
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
1212
use rustc_middle::ty::layout::FnAbiOf;

compiler/rustc_codegen_cranelift/src/analyze.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
use rustc_index::IndexVec;
44
use rustc_middle::mir::StatementKind::*;
5-
use rustc_middle::ty::Ty;
65

76
use crate::prelude::*;
87

compiler/rustc_codegen_cranelift/src/constant.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
use std::cmp::Ordering;
44

55
use cranelift_module::*;
6-
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
6+
use rustc_data_structures::fx::FxHashSet;
77
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
88
use rustc_middle::mir::interpret::{read_target_uint, AllocId, GlobalAlloc, Scalar};
9-
use rustc_middle::mir::ConstValue;
109
use rustc_middle::ty::ScalarInt;
1110

1211
use crate::prelude::*;

compiler/rustc_codegen_cranelift/src/inline_asm.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use std::fmt::Write;
44

55
use rustc_ast::ast::{InlineAsmOptions, InlineAsmTemplatePiece};
6-
use rustc_middle::mir::InlineAsmOperand;
76
use rustc_span::sym;
87
use rustc_target::asm::*;
98
use target_lexicon::BinaryFormat;

compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! Emulate LLVM intrinsics
22
3-
use rustc_middle::ty::GenericArgsRef;
4-
53
use crate::intrinsics::*;
64
use crate::prelude::*;
75

compiler/rustc_codegen_cranelift/src/intrinsics/llvm_aarch64.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! Emulate AArch64 LLVM intrinsics
22
3-
use rustc_middle::ty::GenericArgsRef;
4-
53
use crate::intrinsics::*;
64
use crate::prelude::*;
75

compiler/rustc_codegen_cranelift/src/intrinsics/llvm_x86.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Emulate x86 LLVM intrinsics
22
33
use rustc_ast::ast::{InlineAsmOptions, InlineAsmTemplatePiece};
4-
use rustc_middle::ty::GenericArgsRef;
54
use rustc_target::asm::*;
65

76
use crate::inline_asm::{codegen_inline_asm_inner, CInlineAsmOperand};

compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! Codegen `extern "platform-intrinsic"` intrinsics.
22
33
use cranelift_codegen::ir::immediates::Offset32;
4-
use rustc_middle::ty::GenericArgsRef;
5-
use rustc_span::Symbol;
64
use rustc_target::abi::Endian;
75

86
use super::*;

compiler/rustc_codegen_llvm/src/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use rustc_middle::ty::layout::LayoutOf;
1515
pub use rustc_middle::ty::layout::{FAT_PTR_ADDR, FAT_PTR_EXTRA};
1616
use rustc_middle::ty::Ty;
1717
use rustc_session::config;
18-
use rustc_target::abi::call::ArgAbi;
1918
pub use rustc_target::abi::call::*;
2019
use rustc_target::abi::{self, HasDataLayout, Int};
2120
pub use rustc_target::spec::abi::Abi;

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use rustc_middle::ty::{
3535
use rustc_session::config::{self, DebugInfo, Lto};
3636
use rustc_span::symbol::Symbol;
3737
use rustc_span::FileName;
38-
use rustc_span::{self, FileNameDisplayPreference, SourceFile};
38+
use rustc_span::{FileNameDisplayPreference, SourceFile};
3939
use rustc_symbol_mangling::typeid_for_trait_ref;
4040
use rustc_target::abi::{Align, Size};
4141
use smallvec::smallvec;

compiler/rustc_codegen_llvm/src/debuginfo/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use rustc_middle::ty::{self, Instance, ParamEnv, Ty, TypeVisitableExt};
3232
use rustc_session::config::{self, DebugInfo};
3333
use rustc_session::Session;
3434
use rustc_span::symbol::Symbol;
35-
use rustc_span::{self, BytePos, Pos, SourceFile, SourceFileAndLine, SourceFileHash, Span};
35+
use rustc_span::{BytePos, Pos, SourceFile, SourceFileAndLine, SourceFileHash, Span};
3636
use rustc_target::abi::Size;
3737

3838
use libc::c_uint;

compiler/rustc_codegen_ssa/src/mir/statement.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use rustc_middle::mir::NonDivergingIntrinsic;
33

44
use super::FunctionCx;
55
use super::LocalRef;
6-
use crate::traits::BuilderMethods;
76
use crate::traits::*;
87

98
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {

compiler/rustc_const_eval/src/transform/check_consts/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc_middle::traits::BuiltinImplSource;
1212
use rustc_middle::ty::GenericArgs;
1313
use rustc_middle::ty::{self, adjustment::PointerCoercion, Instance, InstanceDef, Ty, TyCtxt};
1414
use rustc_middle::ty::{TraitRef, TypeVisitableExt};
15-
use rustc_mir_dataflow::{self, Analysis};
15+
use rustc_mir_dataflow::Analysis;
1616
use rustc_span::{sym, Span, Symbol};
1717
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt as _;
1818
use rustc_trait_selection::traits::{self, ObligationCauseCode, ObligationCtxt, SelectionContext};

compiler/rustc_data_structures/src/fingerprint/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use super::*;
2-
use crate::stable_hasher::Hash64;
32

43
// Check that `combine_commutative` is order independent.
54
#[test]

compiler/rustc_data_structures/src/graph/implementation/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::graph::implementation::*;
2-
use std::fmt::Debug;
32

43
type TestGraph = Graph<&'static str, &'static str>;
54

compiler/rustc_data_structures/src/intern/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use super::*;
2-
use std::cmp::Ordering;
32

43
#[derive(Debug)]
54
struct S(u32);

compiler/rustc_data_structures/src/obligation_forest/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use super::*;
22

33
use std::fmt;
4-
use std::marker::PhantomData;
54

65
impl<'a> super::ForestObligation for &'a str {
76
type CacheKey = &'a str;

compiler/rustc_data_structures/src/sip128/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::*;
22

3-
use std::hash::{Hash, Hasher};
3+
use std::hash::Hash;
44

55
// Hash just the bytes of the slice, without length prefix
66
struct Bytes<'a>(&'a [u8]);

compiler/rustc_errors/src/json/tests.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
use super::*;
22

3-
use crate::json::JsonEmitter;
4-
use rustc_span::source_map::{FilePathMapping, SourceMap};
5-
6-
use crate::emitter::{ColorConfig, HumanReadableErrorType};
7-
use crate::{Handler, TerminalUrl};
8-
use rustc_span::{BytePos, Span};
3+
use crate::emitter::ColorConfig;
4+
use crate::Handler;
5+
use rustc_span::BytePos;
96

107
use std::str;
118

compiler/rustc_errors/src/markdown/tests/term.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use std::path::PathBuf;
33
use termcolor::{BufferWriter, ColorChoice};
44

55
use super::*;
6-
use crate::markdown::MdStream;
76

87
const INPUT: &str = include_str!("input.md");
98
const OUTPUT_PATH: &[&str] = &[env!("CARGO_MANIFEST_DIR"), "src","markdown","tests","output.stdout"];

compiler/rustc_expand/src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use rustc_errors::{
2121
use rustc_feature::Features;
2222
use rustc_lint_defs::builtin::PROC_MACRO_BACK_COMPAT;
2323
use rustc_lint_defs::{BufferedEarlyLint, BuiltinLintDiagnostics, RegisteredTools};
24-
use rustc_parse::{self, parser, MACRO_ARGUMENTS};
24+
use rustc_parse::{parser, MACRO_ARGUMENTS};
2525
use rustc_session::errors::report_lit_error;
2626
use rustc_session::{parse::ParseSess, Limit, Session};
2727
use rustc_span::def_id::{CrateNum, DefId, LocalDefId};

compiler/rustc_hir_analysis/src/check/check.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::check::intrinsicck::InlineAsmCtxt;
2-
use crate::errors::{self, LinkageType};
2+
use crate::errors::LinkageType;
33

44
use super::compare_impl_item::check_type_bounds;
55
use super::compare_impl_item::{compare_impl_method, compare_impl_ty};
@@ -8,9 +8,8 @@ use rustc_attr as attr;
88
use rustc_errors::{ErrorGuaranteed, MultiSpan};
99
use rustc_hir as hir;
1010
use rustc_hir::def::{CtorKind, DefKind};
11-
use rustc_hir::def_id::{DefId, LocalDefId, LocalModDefId};
11+
use rustc_hir::def_id::LocalModDefId;
1212
use rustc_hir::Node;
13-
use rustc_infer::infer::outlives::env::OutlivesEnvironment;
1413
use rustc_infer::infer::{RegionVariableOrigin, TyCtxtInferExt};
1514
use rustc_infer::traits::{Obligation, TraitEngineExt as _};
1615
use rustc_lint_defs::builtin::REPR_TRANSPARENT_EXTERNAL_PRIVATE_FIELDS;
@@ -21,18 +20,15 @@ use rustc_middle::ty::layout::{LayoutError, MAX_SIMD_LANES};
2120
use rustc_middle::ty::util::{Discr, IntTypeExt};
2221
use rustc_middle::ty::GenericArgKind;
2322
use rustc_middle::ty::{
24-
self, AdtDef, ParamEnv, RegionKind, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable,
25-
TypeVisitableExt,
23+
AdtDef, ParamEnv, RegionKind, TypeSuperVisitable, TypeVisitable, TypeVisitableExt,
2624
};
2725
use rustc_session::lint::builtin::{UNINHABITED_STATIC, UNSUPPORTED_CALLING_CONVENTIONS};
2826
use rustc_span::symbol::sym;
29-
use rustc_span::{self, Span};
3027
use rustc_target::abi::FieldIdx;
31-
use rustc_target::spec::abi::Abi;
3228
use rustc_trait_selection::traits::error_reporting::on_unimplemented::OnUnimplementedDirective;
3329
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt as _;
3430
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
35-
use rustc_trait_selection::traits::{self, ObligationCtxt, TraitEngine, TraitEngineExt as _};
31+
use rustc_trait_selection::traits::{self, TraitEngine, TraitEngineExt as _};
3632
use rustc_type_ir::fold::TypeFoldable;
3733

3834
use std::ops::ControlFlow;

compiler/rustc_hir_pretty/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc_hir::{BindingAnnotation, ByRef, GenericArg, GenericParam, GenericParam
1616
use rustc_hir::{GenericBound, PatKind, RangeEnd, TraitBoundModifier};
1717
use rustc_span::source_map::SourceMap;
1818
use rustc_span::symbol::{kw, Ident, Symbol};
19-
use rustc_span::{self, FileName};
19+
use rustc_span::FileName;
2020
use rustc_target::spec::abi::Abi;
2121

2222
use std::cell::Cell;

compiler/rustc_hir_typeck/src/coercion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ use rustc_middle::ty::visit::TypeVisitableExt;
5858
use rustc_middle::ty::{self, GenericArgsRef, Ty, TyCtxt, TypeAndMut};
5959
use rustc_session::parse::feature_err;
6060
use rustc_span::symbol::sym;
61-
use rustc_span::{self, DesugaringKind};
61+
use rustc_span::DesugaringKind;
6262
use rustc_target::spec::abi::Abi;
6363
use rustc_trait_selection::infer::InferCtxtExt as _;
6464
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt as _;

compiler/rustc_hir_typeck/src/diverges.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustc_span::{self, Span, DUMMY_SP};
1+
use rustc_span::{Span, DUMMY_SP};
22
use std::{cmp, ops};
33

44
/// Tracks whether executing a node may exit normally (versus

compiler/rustc_hir_typeck/src/expectation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
22
use rustc_middle::ty::{self, Ty};
3-
use rustc_span::{self, Span};
3+
use rustc_span::Span;
44

55
use super::Expectation::*;
66
use super::FnCtxt;

compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc_hir::def::{DefKind, Res};
44
use rustc_hir::def_id::DefId;
55
use rustc_infer::{infer::type_variable::TypeVariableOriginKind, traits::ObligationCauseCode};
66
use rustc_middle::ty::{self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitor};
7-
use rustc_span::{self, symbol::kw, Span};
7+
use rustc_span::{symbol::kw, Span};
88
use rustc_trait_selection::traits;
99

1010
use std::ops::ControlFlow;

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use rustc_middle::ty::visit::TypeVisitableExt;
3333
use rustc_middle::ty::{self, IsSuggestable, Ty, TyCtxt};
3434
use rustc_session::Session;
3535
use rustc_span::symbol::{kw, Ident};
36-
use rustc_span::{self, sym, BytePos, Span};
36+
use rustc_span::{sym, BytePos, Span};
3737
use rustc_trait_selection::traits::{self, ObligationCauseCode, SelectionContext};
3838

3939
use std::iter;

0 commit comments

Comments
 (0)