Skip to content

Commit a349719

Browse files
committed
Re-export more rustc_span::symbol things from rustc_span.
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers to `rustc_span::`. This is a 300+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
1 parent d185062 commit a349719

File tree

502 files changed

+553
-883
lines changed

Some content is hidden

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

502 files changed

+553
-883
lines changed

compiler/rustc_abi/src/extern_abi/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use std::fmt;
22

33
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
4-
use rustc_span::symbol::sym;
5-
use rustc_span::{Span, Symbol};
4+
use rustc_span::{Span, Symbol, sym};
65

76
#[cfg(test)]
87
mod tests;

compiler/rustc_ast/src/ast.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ use rustc_data_structures::sync::Lrc;
3131
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
3232
pub use rustc_span::AttrId;
3333
use rustc_span::source_map::{Spanned, respan};
34-
use rustc_span::symbol::{Ident, Symbol, kw, sym};
35-
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span};
34+
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Ident, Span, Symbol, kw, sym};
3635
use thin_vec::{ThinVec, thin_vec};
3736

3837
pub use crate::format::*;

compiler/rustc_ast/src/attr/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use std::iter;
44
use std::sync::atomic::{AtomicU32, Ordering};
55

66
use rustc_index::bit_set::GrowableBitSet;
7-
use rustc_span::Span;
8-
use rustc_span::symbol::{Ident, Symbol, sym};
7+
use rustc_span::{Ident, Span, Symbol, sym};
98
use smallvec::{SmallVec, smallvec};
109
use thin_vec::{ThinVec, thin_vec};
1110

compiler/rustc_ast/src/entry.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use rustc_span::Symbol;
2-
use rustc_span::symbol::sym;
1+
use rustc_span::{Symbol, sym};
32

43
use crate::{Attribute, attr};
54

compiler/rustc_ast/src/expand/allocator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use rustc_macros::HashStable_Generic;
2-
use rustc_span::symbol::{Symbol, sym};
2+
use rustc_span::{Symbol, sym};
33

44
#[derive(Clone, Debug, Copy, Eq, PartialEq, HashStable_Generic)]
55
pub enum AllocatorKind {

compiler/rustc_ast/src/expand/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Definitions shared by macros / syntax extensions and e.g. `rustc_middle`.
22
33
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
4+
use rustc_span::Ident;
45
use rustc_span::def_id::DefId;
5-
use rustc_span::symbol::Ident;
66

77
use crate::MetaItem;
88

compiler/rustc_ast/src/format.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use rustc_data_structures::fx::FxHashMap;
22
use rustc_macros::{Decodable, Encodable};
3-
use rustc_span::Span;
4-
use rustc_span::symbol::{Ident, Symbol};
3+
use rustc_span::{Ident, Span, Symbol};
54

65
use crate::Expr;
76
use crate::ptr::P;

compiler/rustc_ast/src/mut_visit.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ use std::panic;
1313
use rustc_data_structures::flat_map_in_place::FlatMapInPlace;
1414
use rustc_data_structures::stack::ensure_sufficient_stack;
1515
use rustc_data_structures::sync::Lrc;
16-
use rustc_span::Span;
1716
use rustc_span::source_map::Spanned;
18-
use rustc_span::symbol::Ident;
17+
use rustc_span::{Ident, Span};
1918
use smallvec::{Array, SmallVec, smallvec};
2019
use thin_vec::ThinVec;
2120

compiler/rustc_ast/src/token.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1111
use rustc_data_structures::sync::Lrc;
1212
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
1313
use rustc_span::edition::Edition;
14+
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span, kw, sym};
1415
#[allow(clippy::useless_attribute)] // FIXME: following use of `hidden_glob_reexports` incorrectly triggers `useless_attribute` lint.
1516
#[allow(hidden_glob_reexports)]
16-
use rustc_span::symbol::{Ident, Symbol};
17-
use rustc_span::symbol::{kw, sym};
18-
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span};
17+
use rustc_span::{Ident, Symbol};
1918

2019
use crate::ast;
2120
use crate::ptr::P;

compiler/rustc_ast/src/util/literal.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ use std::{ascii, fmt, str};
55
use rustc_lexer::unescape::{
66
MixedUnit, Mode, byte_from_char, unescape_byte, unescape_char, unescape_mixed, unescape_unicode,
77
};
8-
use rustc_span::Span;
9-
use rustc_span::symbol::{Symbol, kw, sym};
8+
use rustc_span::{Span, Symbol, kw, sym};
109
use tracing::debug;
1110

1211
use crate::ast::{self, LitKind, MetaItemLit, StrStyle};

compiler/rustc_ast/src/util/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustc_span::symbol::kw;
1+
use rustc_span::kw;
22

33
use crate::ast::{self, BinOpKind};
44
use crate::token::{self, BinOpToken, Token};

compiler/rustc_ast/src/visit.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
1616
pub use rustc_ast_ir::visit::VisitorResult;
1717
pub use rustc_ast_ir::{try_visit, visit_opt, walk_list, walk_visitable_list};
18-
use rustc_span::Span;
19-
use rustc_span::symbol::Ident;
18+
use rustc_span::{Ident, Span};
2019

2120
use crate::ast::*;
2221
use crate::ptr::P;

compiler/rustc_ast_lowering/src/asm.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
77
use rustc_hir as hir;
88
use rustc_hir::def::{DefKind, Res};
99
use rustc_session::parse::feature_err;
10-
use rustc_span::symbol::kw;
11-
use rustc_span::{Span, sym};
10+
use rustc_span::{Span, kw, sym};
1211
use rustc_target::asm;
1312

1413
use super::LoweringContext;

compiler/rustc_ast_lowering/src/delegation.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ use rustc_errors::ErrorGuaranteed;
4646
use rustc_hir::def_id::DefId;
4747
use rustc_middle::span_bug;
4848
use rustc_middle::ty::{Asyncness, ResolverAstLowering};
49-
use rustc_span::Span;
50-
use rustc_span::symbol::Ident;
49+
use rustc_span::{Ident, Span};
5150
use rustc_target::spec::abi;
5251
use {rustc_ast as ast, rustc_hir as hir};
5352

compiler/rustc_ast_lowering/src/errors.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use rustc_errors::codes::*;
22
use rustc_errors::{Diag, DiagArgFromDisplay, EmissionGuarantee, SubdiagMessageOp, Subdiagnostic};
33
use rustc_macros::{Diagnostic, Subdiagnostic};
4-
use rustc_span::symbol::Ident;
5-
use rustc_span::{Span, Symbol};
4+
use rustc_span::{Ident, Span, Symbol};
65

76
#[derive(Diagnostic)]
87
#[diag(ast_lowering_generic_type_with_parentheses, code = E0214)]

compiler/rustc_ast_lowering/src/expr.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ use rustc_middle::span_bug;
1313
use rustc_middle::ty::TyCtxt;
1414
use rustc_session::errors::report_lit_error;
1515
use rustc_span::source_map::{Spanned, respan};
16-
use rustc_span::symbol::{Ident, Symbol, kw, sym};
17-
use rustc_span::{DUMMY_SP, DesugaringKind, Span};
16+
use rustc_span::{DUMMY_SP, DesugaringKind, Ident, Span, Symbol, kw, sym};
1817
use thin_vec::{ThinVec, thin_vec};
1918
use visit::{Visitor, walk_expr};
2019

compiler/rustc_ast_lowering/src/format.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ use rustc_ast::*;
66
use rustc_data_structures::fx::FxIndexMap;
77
use rustc_hir as hir;
88
use rustc_session::config::FmtDebug;
9-
use rustc_span::symbol::{Ident, kw};
10-
use rustc_span::{Span, Symbol, sym};
9+
use rustc_span::{Ident, Span, Symbol, kw, sym};
1110

1211
use super::LoweringContext;
1312

compiler/rustc_ast_lowering/src/item.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ use rustc_index::{IndexSlice, IndexVec};
1010
use rustc_middle::span_bug;
1111
use rustc_middle::ty::{ResolverAstLowering, TyCtxt};
1212
use rustc_span::edit_distance::find_best_match_for_name;
13-
use rustc_span::symbol::{Ident, kw, sym};
14-
use rustc_span::{DesugaringKind, Span, Symbol};
13+
use rustc_span::{DesugaringKind, Ident, Span, Symbol, kw, sym};
1514
use rustc_target::spec::abi;
1615
use smallvec::{SmallVec, smallvec};
1716
use thin_vec::ThinVec;
@@ -1172,9 +1171,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
11721171
// we can keep the same name for the parameter.
11731172
// This lets rustdoc render it correctly in documentation.
11741173
hir::PatKind::Binding(_, _, ident, _) => (ident, false),
1175-
hir::PatKind::Wild => {
1176-
(Ident::with_dummy_span(rustc_span::symbol::kw::Underscore), false)
1177-
}
1174+
hir::PatKind::Wild => (Ident::with_dummy_span(rustc_span::kw::Underscore), false),
11781175
_ => {
11791176
// Replace the ident for bindings that aren't simple.
11801177
let name = format!("__arg{index}");

compiler/rustc_ast_lowering/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ use rustc_macros::extension;
5959
use rustc_middle::span_bug;
6060
use rustc_middle::ty::{ResolverAstLowering, TyCtxt};
6161
use rustc_session::parse::{add_feature_diagnostics, feature_err};
62-
use rustc_span::symbol::{Ident, Symbol, kw, sym};
63-
use rustc_span::{DUMMY_SP, DesugaringKind, Span};
62+
use rustc_span::{DUMMY_SP, DesugaringKind, Ident, Span, Symbol, kw, sym};
6463
use smallvec::{SmallVec, smallvec};
6564
use thin_vec::ThinVec;
6665
use tracing::{debug, instrument, trace};

compiler/rustc_ast_lowering/src/pat.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ use rustc_ast::*;
33
use rustc_data_structures::stack::ensure_sufficient_stack;
44
use rustc_hir as hir;
55
use rustc_hir::def::Res;
6-
use rustc_span::Span;
76
use rustc_span::source_map::Spanned;
8-
use rustc_span::symbol::Ident;
7+
use rustc_span::{Ident, Span};
98

109
use super::errors::{
1110
ArbitraryExpressionInPattern, ExtraDoubleDot, MisplacedDoubleDot, SubTupleBinding,

compiler/rustc_ast_lowering/src/path.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ use rustc_hir::def::{DefKind, PartialRes, Res};
66
use rustc_hir::def_id::DefId;
77
use rustc_middle::span_bug;
88
use rustc_session::parse::add_feature_diagnostics;
9-
use rustc_span::symbol::{Ident, kw, sym};
10-
use rustc_span::{BytePos, DUMMY_SP, DesugaringKind, Span, Symbol};
9+
use rustc_span::{BytePos, DUMMY_SP, DesugaringKind, Ident, Span, Symbol, kw, sym};
1110
use smallvec::{SmallVec, smallvec};
1211
use tracing::{debug, instrument};
1312

compiler/rustc_ast_passes/src/ast_validation.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ use rustc_session::lint::builtin::{
3434
PATTERNS_IN_FNS_WITHOUT_BODY,
3535
};
3636
use rustc_session::lint::{BuiltinLintDiag, LintBuffer};
37-
use rustc_span::Span;
38-
use rustc_span::symbol::{Ident, kw, sym};
37+
use rustc_span::{Ident, Span, kw, sym};
3938
use rustc_target::spec::abi;
4039
use thin_vec::thin_vec;
4140

compiler/rustc_ast_passes/src/errors.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use rustc_ast::ParamKindOrd;
44
use rustc_errors::codes::*;
55
use rustc_errors::{Applicability, Diag, EmissionGuarantee, SubdiagMessageOp, Subdiagnostic};
66
use rustc_macros::{Diagnostic, Subdiagnostic};
7-
use rustc_span::symbol::Ident;
8-
use rustc_span::{Span, Symbol};
7+
use rustc_span::{Ident, Span, Symbol};
98

109
use crate::fluent_generated as fluent;
1110

compiler/rustc_ast_passes/src/feature_gate.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ use rustc_ast::{NodeId, PatKind, attr, token};
44
use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP, BuiltinAttribute, Features, GateIssue};
55
use rustc_session::Session;
66
use rustc_session::parse::{feature_err, feature_err_issue, feature_warn};
7-
use rustc_span::Span;
87
use rustc_span::source_map::Spanned;
9-
use rustc_span::symbol::{Symbol, sym};
8+
use rustc_span::{Span, Symbol, sym};
109
use rustc_target::spec::abi;
1110
use thin_vec::ThinVec;
1211

compiler/rustc_ast_pretty/src/pprust/state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ use rustc_ast::{
2424
use rustc_data_structures::sync::Lrc;
2525
use rustc_span::edition::Edition;
2626
use rustc_span::source_map::{SourceMap, Spanned};
27-
use rustc_span::symbol::{Ident, IdentPrinter, Symbol, kw, sym};
28-
use rustc_span::{BytePos, CharPos, DUMMY_SP, FileName, Pos, Span};
27+
use rustc_span::symbol::IdentPrinter;
28+
use rustc_span::{BytePos, CharPos, DUMMY_SP, FileName, Ident, Pos, Span, Symbol, kw, sym};
2929
use thin_vec::ThinVec;
3030

3131
use crate::pp::Breaks::{Consistent, Inconsistent};

compiler/rustc_ast_pretty/src/pprust/state/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use itertools::{Itertools, Position};
33
use rustc_ast as ast;
44
use rustc_ast::ModKind;
55
use rustc_ast::ptr::P;
6-
use rustc_span::symbol::Ident;
6+
use rustc_span::Ident;
77

88
use crate::pp::Breaks::Inconsistent;
99
use crate::pprust::state::fixup::FixupContext;

compiler/rustc_ast_pretty/src/pprust/tests.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use rustc_ast as ast;
2-
use rustc_span::symbol::Ident;
3-
use rustc_span::{DUMMY_SP, create_default_session_globals_then};
2+
use rustc_span::{DUMMY_SP, Ident, create_default_session_globals_then};
43
use thin_vec::ThinVec;
54

65
use super::*;

compiler/rustc_attr/src/builtin.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ use rustc_session::lint::BuiltinLintDiag;
1616
use rustc_session::lint::builtin::UNEXPECTED_CFGS;
1717
use rustc_session::parse::feature_err;
1818
use rustc_session::{RustcVersion, Session};
19-
use rustc_span::Span;
2019
use rustc_span::hygiene::Transparency;
21-
use rustc_span::symbol::{Symbol, kw, sym};
20+
use rustc_span::{Span, Symbol, kw, sym};
2221

2322
use crate::fluent_generated;
2423
use crate::session_diagnostics::{self, IncorrectReprFormatGenericCause};

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ use rustc_middle::util::CallKind;
3434
use rustc_mir_dataflow::move_paths::{InitKind, MoveOutIndex, MovePathIndex};
3535
use rustc_span::def_id::{DefId, LocalDefId};
3636
use rustc_span::hygiene::DesugaringKind;
37-
use rustc_span::symbol::{Ident, kw, sym};
38-
use rustc_span::{BytePos, Span, Symbol};
37+
use rustc_span::{BytePos, Ident, Span, Symbol, kw, sym};
3938
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
4039
use rustc_trait_selection::error_reporting::traits::FindExprBySpan;
4140
use rustc_trait_selection::infer::InferCtxtExt;

compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ use rustc_middle::mir::{
1717
};
1818
use rustc_middle::ty::adjustment::PointerCoercion;
1919
use rustc_middle::ty::{self, RegionVid, Ty, TyCtxt};
20-
use rustc_span::symbol::{Symbol, kw};
21-
use rustc_span::{DesugaringKind, Span, sym};
20+
use rustc_span::{DesugaringKind, Span, Symbol, kw, sym};
2221
use rustc_trait_selection::error_reporting::traits::FindExprBySpan;
2322
use tracing::{debug, instrument};
2423

compiler/rustc_borrowck/src/diagnostics/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ use rustc_middle::util::{CallDesugaringKind, call_kind};
2020
use rustc_mir_dataflow::move_paths::{InitLocation, LookupResult};
2121
use rustc_span::def_id::LocalDefId;
2222
use rustc_span::source_map::Spanned;
23-
use rustc_span::symbol::sym;
24-
use rustc_span::{DUMMY_SP, Span, Symbol};
23+
use rustc_span::{DUMMY_SP, Span, Symbol, sym};
2524
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
2625
use rustc_trait_selection::infer::InferCtxtExt;
2726
use rustc_trait_selection::traits::{

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ use rustc_middle::mir::{
1515
PlaceRef, ProjectionElem,
1616
};
1717
use rustc_middle::ty::{self, InstanceKind, Ty, TyCtxt, Upcast};
18-
use rustc_span::symbol::{Symbol, kw};
19-
use rustc_span::{BytePos, DesugaringKind, Span, sym};
18+
use rustc_span::{BytePos, DesugaringKind, Span, Symbol, kw, sym};
2019
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
2120
use rustc_trait_selection::infer::InferCtxtExt;
2221
use rustc_trait_selection::traits;

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ use rustc_middle::bug;
1515
use rustc_middle::hir::place::PlaceBase;
1616
use rustc_middle::mir::{ConstraintCategory, ReturnConstraint};
1717
use rustc_middle::ty::{self, GenericArgs, Region, RegionVid, Ty, TyCtxt, TypeVisitor};
18-
use rustc_span::Span;
19-
use rustc_span::symbol::{Ident, kw};
18+
use rustc_span::{Ident, Span, kw};
2019
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
2120
use rustc_trait_selection::error_reporting::infer::nice_region_error::{
2221
self, HirTraitObjectVisitor, NiceRegionError, TraitObjectVisitor, find_anon_type,

compiler/rustc_borrowck/src/diagnostics/region_name.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ use rustc_hir::def::{DefKind, Res};
1111
use rustc_middle::ty::print::RegionHighlightMode;
1212
use rustc_middle::ty::{self, GenericArgKind, GenericArgsRef, RegionVid, Ty};
1313
use rustc_middle::{bug, span_bug};
14-
use rustc_span::symbol::{Symbol, kw, sym};
15-
use rustc_span::{DUMMY_SP, Span};
14+
use rustc_span::{DUMMY_SP, Span, Symbol, kw, sym};
1615
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
1716
use tracing::{debug, instrument};
1817

compiler/rustc_borrowck/src/diagnostics/var_name.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use rustc_index::IndexSlice;
22
use rustc_middle::mir::{Body, Local};
33
use rustc_middle::ty::{self, RegionVid, TyCtxt};
4-
use rustc_span::Span;
5-
use rustc_span::symbol::Symbol;
4+
use rustc_span::{Span, Symbol};
65
use tracing::debug;
76

87
use crate::region_infer::RegionInferenceContext;

compiler/rustc_borrowck/src/nll.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use rustc_mir_dataflow::impls::MaybeInitializedPlaces;
2121
use rustc_mir_dataflow::move_paths::MoveData;
2222
use rustc_mir_dataflow::points::DenseLocationMap;
2323
use rustc_session::config::MirIncludeSpans;
24-
use rustc_span::symbol::sym;
24+
use rustc_span::sym;
2525
use tracing::{debug, instrument};
2626

2727
use crate::borrow_set::BorrowSet;

compiler/rustc_borrowck/src/type_check/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ use rustc_mir_dataflow::move_paths::MoveData;
4040
use rustc_mir_dataflow::points::DenseLocationMap;
4141
use rustc_span::def_id::CRATE_DEF_ID;
4242
use rustc_span::source_map::Spanned;
43-
use rustc_span::symbol::sym;
44-
use rustc_span::{DUMMY_SP, Span};
43+
use rustc_span::{DUMMY_SP, Span, sym};
4544
use rustc_trait_selection::traits::query::type_op::custom::{
4645
CustomTypeOp, scrape_region_constraints,
4746
};

compiler/rustc_borrowck/src/type_check/relate_tys.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ use rustc_middle::traits::query::NoSolution;
1313
use rustc_middle::ty::fold::FnMutDelegate;
1414
use rustc_middle::ty::relate::combine::{super_combine_consts, super_combine_tys};
1515
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt};
16-
use rustc_span::symbol::sym;
17-
use rustc_span::{Span, Symbol};
16+
use rustc_span::{Span, Symbol, sym};
1817
use tracing::{debug, instrument};
1918

2019
use crate::constraints::OutlivesConstraint;

compiler/rustc_borrowck/src/universal_regions.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ use rustc_middle::ty::{
3333
TyCtxt, TypeVisitableExt,
3434
};
3535
use rustc_middle::{bug, span_bug};
36-
use rustc_span::ErrorGuaranteed;
37-
use rustc_span::symbol::{kw, sym};
36+
use rustc_span::{ErrorGuaranteed, kw, sym};
3837
use tracing::{debug, instrument};
3938

4039
use crate::BorrowckInferCtxt;

0 commit comments

Comments
 (0)