Skip to content

Commit 4ff12ce

Browse files
committed
Normalize syntax::symbol imports.
1 parent 75e4783 commit 4ff12ce

File tree

174 files changed

+187
-183
lines changed

Some content is hidden

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

174 files changed

+187
-183
lines changed

src/librustc/arena.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ macro_rules! arena_types {
9494
>
9595
>,
9696
[few] diagnostic_items: rustc_data_structures::fx::FxHashMap<
97-
syntax::symbol::Symbol,
97+
rustc_span::symbol::Symbol,
9898
rustc::hir::def_id::DefId,
9999
>,
100100
[few] resolve_lifetimes: rustc::middle::resolve_lifetime::ResolveLifetimes,
@@ -105,7 +105,7 @@ macro_rules! arena_types {
105105
[few] privacy_access_levels: rustc::middle::privacy::AccessLevels,
106106
[few] target_features_whitelist: rustc_data_structures::fx::FxHashMap<
107107
String,
108-
Option<syntax::symbol::Symbol>
108+
Option<rustc_span::symbol::Symbol>
109109
>,
110110
[few] wasm_import_module_map: rustc_data_structures::fx::FxHashMap<
111111
rustc::hir::def_id::DefId,

src/librustc/hir/check_attr.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ use crate::lint::builtin::UNUSED_ATTRIBUTES;
1212
use crate::ty::query::Providers;
1313
use crate::ty::TyCtxt;
1414

15+
use rustc_error_codes::*;
16+
use rustc_span::symbol::sym;
1517
use rustc_span::Span;
16-
use std::fmt::{self, Display};
17-
use syntax::{attr, symbol::sym};
18+
use syntax::attr;
1819

19-
use rustc_error_codes::*;
20+
use std::fmt::{self, Display};
2021

2122
#[derive(Copy, Clone, PartialEq)]
2223
pub(crate) enum MethodKind {

src/librustc/hir/print.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use rustc_span::source_map::{SourceMap, Spanned};
2+
use rustc_span::symbol::kw;
23
use rustc_span::{self, BytePos, FileName};
34
use rustc_target::spec::abi::Abi;
45
use syntax::ast;
56
use syntax::print::pp::Breaks::{Consistent, Inconsistent};
67
use syntax::print::pp::{self, Breaks};
78
use syntax::print::pprust::{self, Comments, PrintState};
89
use syntax::sess::ParseSess;
9-
use syntax::symbol::kw;
1010
use syntax::util::parser::{self, AssocOp, Fixity};
1111

1212
use crate::hir;

src/librustc/ich/hcx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use crate::ty::{fast_reject, TyCtxt};
1010
use std::cmp::Ord;
1111

1212
use rustc_span::source_map::SourceMap;
13+
use rustc_span::symbol::Symbol;
1314
use rustc_span::{BytePos, SourceFile};
1415
use syntax::ast;
15-
use syntax::symbol::Symbol;
1616

1717
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1818
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};

src/librustc/ich/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ pub use self::hcx::{
44
hash_stable_trait_impls, NodeIdHashingMode, StableHashingContext, StableHashingContextProvider,
55
};
66
crate use rustc_data_structures::fingerprint::Fingerprint;
7+
use rustc_span::symbol::{sym, Symbol};
78
pub use rustc_span::CachingSourceMapView;
8-
use syntax::symbol::{sym, Symbol};
99

1010
mod hcx;
1111

src/librustc/infer/error_reporting/need_type_info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ use crate::ty::print::Print;
77
use crate::ty::{self, DefIdTree, Infer, Ty, TyVar};
88
use errors::{Applicability, DiagnosticBuilder};
99
use rustc_span::source_map::DesugaringKind;
10+
use rustc_span::symbol::kw;
1011
use rustc_span::Span;
1112
use std::borrow::Cow;
12-
use syntax::symbol::kw;
1313

1414
use rustc_error_codes::*;
1515

src/librustc/infer/type_variable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::hir::def_id::DefId;
22
use crate::ty::{self, Ty, TyVid};
3+
use rustc_span::symbol::Symbol;
34
use rustc_span::Span;
4-
use syntax::symbol::Symbol;
55

66
use rustc_data_structures::snapshot_vec as sv;
77
use rustc_data_structures::unify as ut;

src/librustc/infer/unify_key.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::ty::{self, FloatVarValue, InferConst, IntVarValue, Ty, TyCtxt};
22
use rustc_data_structures::unify::InPlace;
33
use rustc_data_structures::unify::{EqUnifyValue, NoError, UnificationTable, UnifyKey, UnifyValue};
4+
use rustc_span::symbol::Symbol;
45
use rustc_span::{Span, DUMMY_SP};
5-
use syntax::symbol::Symbol;
66

77
use std::cell::RefMut;
88
use std::cmp;

src/librustc/lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ use crate::session::Session;
1010
use errors::{pluralize, Applicability, DiagnosticBuilder};
1111
use rustc_session::declare_lint;
1212
use rustc_span::source_map::Span;
13+
use rustc_span::symbol::Symbol;
1314
use syntax::ast;
1415
use syntax::early_buffered_lints::{ILL_FORMED_ATTRIBUTE_INPUT, META_VARIABLE_MISUSE};
1516
use syntax::edition::Edition;
16-
use syntax::symbol::Symbol;
1717

1818
declare_lint! {
1919
pub EXCEEDING_BITSHIFTS,

src/librustc/lint/internal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use crate::lint::{
88
use errors::Applicability;
99
use rustc_data_structures::fx::FxHashMap;
1010
use rustc_session::declare_tool_lint;
11+
use rustc_span::symbol::{sym, Symbol};
1112
use syntax::ast::{Ident, Item, ItemKind};
12-
use syntax::symbol::{sym, Symbol};
1313

1414
declare_tool_lint! {
1515
pub rustc::DEFAULT_HASH_TYPES,

src/librustc/lint/levels.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ use crate::util::nodemap::FxHashMap;
1010
use errors::{Applicability, DiagnosticBuilder};
1111
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1212
use rustc_span::source_map::MultiSpan;
13+
use rustc_span::symbol::{sym, Symbol};
1314
use syntax::ast;
1415
use syntax::attr;
1516
use syntax::feature_gate;
1617
use syntax::print::pprust;
17-
use syntax::symbol::{sym, Symbol};
1818

1919
use rustc_error_codes::*;
2020

src/librustc/lint/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ use crate::util::nodemap::NodeMap;
3434
use errors::{DiagnosticBuilder, DiagnosticId};
3535
use rustc_span::hygiene::MacroKind;
3636
use rustc_span::source_map::{DesugaringKind, ExpnKind, MultiSpan};
37+
use rustc_span::symbol::Symbol;
3738
use rustc_span::Span;
3839
use syntax::ast;
39-
use syntax::symbol::Symbol;
4040

4141
pub use crate::lint::context::{
4242
check_ast_crate, check_crate, late_lint_mod, BufferedEarlyLint, CheckLintNameResult,

src/librustc/middle/cstore.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ use rustc_data_structures::svh::Svh;
1212

1313
use rustc_data_structures::sync::{self, MetadataRef};
1414
use rustc_macros::HashStable;
15+
use rustc_span::symbol::Symbol;
1516
use rustc_span::Span;
1617
use rustc_target::spec::Target;
1718
use std::any::Any;
1819
use std::path::{Path, PathBuf};
1920
use syntax::ast;
2021
use syntax::expand::allocator::AllocatorKind;
21-
use syntax::symbol::Symbol;
2222

2323
pub use self::NativeLibraryKind::*;
2424
pub use rustc_session::utils::NativeLibraryKind;

src/librustc/middle/lang_items.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ use crate::util::nodemap::FxHashMap;
1919
use crate::hir;
2020
use crate::hir::itemlikevisit::ItemLikeVisitor;
2121
use rustc_macros::HashStable;
22+
use rustc_span::symbol::{sym, Symbol};
2223
use rustc_span::Span;
2324
use syntax::ast;
24-
use syntax::symbol::{sym, Symbol};
2525

2626
use rustc_error_codes::*;
2727

src/librustc/middle/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub mod free_region;
55
pub mod lang_items;
66
pub mod lib_features {
77
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
8-
use syntax::symbol::Symbol;
8+
use rustc_span::symbol::Symbol;
99

1010
#[derive(HashStable)]
1111
pub struct LibFeatures {

src/librustc/middle/recursion_limit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// just peeks and looks for that attribute.
77

88
use crate::session::Session;
9+
use rustc_span::symbol::{sym, Symbol};
910
use syntax::ast;
10-
use syntax::symbol::{sym, Symbol};
1111

1212
use rustc_data_structures::sync::Once;
1313

src/librustc/middle/stability.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ use crate::ty::{self, TyCtxt};
1313
use crate::util::nodemap::{FxHashMap, FxHashSet};
1414
use errors::DiagnosticBuilder;
1515
use rustc_feature::GateIssue;
16+
use rustc_span::symbol::{sym, Symbol};
1617
use rustc_span::{MultiSpan, Span};
1718
use syntax::ast::CRATE_NODE_ID;
1819
use syntax::attr::{self, ConstStability, Deprecation, RustcDeprecation, Stability};
1920
use syntax::errors::Applicability;
2021
use syntax::feature_gate::feature_err_issue;
21-
use syntax::symbol::{sym, Symbol};
2222

2323
use std::num::NonZeroU32;
2424

src/librustc/middle/weak_lang_items.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use crate::hir::intravisit;
99
use crate::hir::intravisit::{NestedVisitorMap, Visitor};
1010
use crate::ty::TyCtxt;
1111
use rustc_data_structures::fx::FxHashSet;
12+
use rustc_span::symbol::{sym, Symbol};
1213
use rustc_span::Span;
1314
use rustc_target::spec::PanicStrategy;
1415
use syntax::ast;
15-
use syntax::symbol::{sym, Symbol};
1616

1717
use rustc_error_codes::*;
1818

src/librustc/mir/interpret/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ use backtrace::Backtrace;
1111
use errors::DiagnosticBuilder;
1212
use hir::GeneratorKind;
1313
use rustc_macros::HashStable;
14+
use rustc_span::symbol::Symbol;
1415
use rustc_span::{Pos, Span};
1516
use rustc_target::spec::abi::Abi;
1617
use std::{any::Any, env, fmt};
17-
use syntax::symbol::Symbol;
1818

1919
use rustc_error_codes::*;
2020

src/librustc/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use rustc_index::bit_set::BitMatrix;
2727
use rustc_index::vec::{Idx, IndexVec};
2828
use rustc_macros::HashStable;
2929
use rustc_serialize::{Decodable, Encodable};
30+
use rustc_span::symbol::Symbol;
3031
use rustc_span::{Span, DUMMY_SP};
3132
use smallvec::SmallVec;
3233
use std::borrow::Cow;
@@ -36,7 +37,6 @@ use std::slice;
3637
use std::{iter, mem, option, u32};
3738
pub use syntax::ast::Mutability;
3839
use syntax::ast::Name;
39-
use syntax::symbol::Symbol;
4040

4141
pub use crate::mir::cache::{BodyAndCache, ReadOnlyBodyAndCache};
4242
pub use crate::mir::interpret::AssertMessage;

src/librustc/mir/mono.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use crate::util::nodemap::FxHashMap;
99
use rustc_data_structures::base_n;
1010
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1111
use rustc_span::source_map::Span;
12+
use rustc_span::symbol::Symbol;
1213
use std::fmt;
1314
use std::hash::Hash;
1415
use syntax::attr::InlineAttr;
15-
use syntax::symbol::Symbol;
1616

1717
/// Describes how a monomorphization will be instantiated in object files.
1818
#[derive(PartialEq)]

src/librustc/traits/coherence.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use crate::traits::{self, Normalized, Obligation, ObligationCause, SelectionCont
1212
use crate::ty::fold::TypeFoldable;
1313
use crate::ty::subst::Subst;
1414
use crate::ty::{self, Ty, TyCtxt};
15+
use rustc_span::symbol::sym;
1516
use rustc_span::DUMMY_SP;
16-
use syntax::symbol::sym;
1717

1818
/// Whether we do the orphan check relative to this crate or
1919
/// to some remote crate.

src/librustc/traits/error_reporting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ use crate::util::nodemap::{FxHashMap, FxHashSet};
2626
use errors::{pluralize, Applicability, DiagnosticBuilder, Style};
2727
use rustc::hir::def_id::LOCAL_CRATE;
2828
use rustc_span::source_map::SourceMap;
29+
use rustc_span::symbol::{kw, sym};
2930
use rustc_span::{ExpnKind, MultiSpan, Span, DUMMY_SP};
3031
use std::fmt;
3132
use syntax::ast;
32-
use syntax::symbol::{kw, sym};
3333

3434
use rustc_error_codes::*;
3535

src/librustc/traits/object_safety.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ use crate::lint;
1616
use crate::traits::{self, Obligation, ObligationCause};
1717
use crate::ty::subst::{InternalSubsts, Subst};
1818
use crate::ty::{self, Predicate, ToPredicate, Ty, TyCtxt, TypeFoldable};
19+
use rustc_span::symbol::Symbol;
1920
use rustc_span::{Span, DUMMY_SP};
2021
use std::borrow::Cow;
2122
use std::iter::{self};
2223
use syntax::ast::{self};
23-
use syntax::symbol::Symbol;
2424

2525
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
2626
pub enum ObjectSafetyViolation {

src/librustc/traits/on_unimplemented.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use crate::ty::{self, GenericParamDefKind, TyCtxt};
55
use crate::util::common::ErrorReported;
66
use crate::util::nodemap::FxHashMap;
77

8+
use rustc_span::symbol::{kw, sym, Symbol};
89
use rustc_span::Span;
910
use syntax::ast::{MetaItem, NestedMetaItem};
1011
use syntax::attr;
11-
use syntax::symbol::{kw, sym, Symbol};
1212

1313
use rustc_error_codes::*;
1414

src/librustc/traits/project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ use crate::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt};
2121
use crate::util::common::FN_OUTPUT_NAME;
2222
use rustc_data_structures::snapshot_map::{Snapshot, SnapshotMap};
2323
use rustc_macros::HashStable;
24+
use rustc_span::symbol::sym;
2425
use rustc_span::DUMMY_SP;
2526
use syntax::ast::Ident;
26-
use syntax::symbol::sym;
2727

2828
/// Depending on the stage of compilation, we want projection to be
2929
/// more or less conservative.

src/librustc/traits/select.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ use crate::hir;
4242
use crate::util::nodemap::{FxHashMap, FxHashSet};
4343
use rustc_data_structures::sync::Lock;
4444
use rustc_index::bit_set::GrowableBitSet;
45+
use rustc_span::symbol::sym;
4546
use rustc_target::spec::abi::Abi;
4647
use std::cell::{Cell, RefCell};
4748
use std::cmp;
4849
use std::fmt::{self, Display};
4950
use std::iter;
5051
use std::rc::Rc;
5152
use syntax::attr;
52-
use syntax::symbol::sym;
5353

5454
pub struct SelectionContext<'cx, 'tcx> {
5555
infcx: &'cx InferCtxt<'cx, 'tcx>,

src/librustc/traits/structural_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use crate::traits::project::Normalized;
33
use crate::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
44
use crate::ty::{self, Lift, Ty, TyCtxt};
55
use chalk_engine;
6+
use rustc_span::symbol::Symbol;
67
use smallvec::SmallVec;
7-
use syntax::symbol::Symbol;
88

99
use std::collections::{BTreeMap, BTreeSet};
1010
use std::fmt;

src/librustc/ty/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ use rustc_data_structures::sync::{Lock, Lrc, WorkerLocal};
6060
use rustc_index::vec::{Idx, IndexVec};
6161
use rustc_macros::HashStable;
6262
use rustc_span::source_map::MultiSpan;
63+
use rustc_span::symbol::{kw, sym, Symbol};
6364
use rustc_span::Span;
6465
use rustc_target::spec::abi;
6566
use smallvec::SmallVec;
@@ -76,7 +77,6 @@ use std::sync::Arc;
7677
use syntax::ast;
7778
use syntax::attr;
7879
use syntax::expand::allocator::AllocatorKind;
79-
use syntax::symbol::{kw, sym, Symbol};
8080

8181
pub struct AllArenas {
8282
pub interner: SyncDroplessArena,

src/librustc/ty/print/pretty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ use crate::ty::{self, DefIdTree, ParamConst, Ty, TyCtxt, TypeFoldable};
1111

1212
use rustc_apfloat::ieee::{Double, Single};
1313
use rustc_apfloat::Float;
14+
use rustc_span::symbol::{kw, Symbol};
1415
use rustc_target::spec::abi::Abi;
1516
use syntax::ast;
1617
use syntax::attr::{SignedInt, UnsignedInt};
17-
use syntax::symbol::{kw, Symbol};
1818

1919
use std::cell::Cell;
2020
use std::collections::BTreeMap;

src/librustc/ty/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ use rustc_data_structures::sync::Lrc;
4747
use rustc_index::vec::IndexVec;
4848
use rustc_target::spec::PanicStrategy;
4949

50+
use rustc_span::symbol::Symbol;
5051
use rustc_span::{Span, DUMMY_SP};
5152
use std::any::type_name;
5253
use std::borrow::Cow;
5354
use std::ops::Deref;
5455
use std::sync::Arc;
5556
use syntax::ast;
5657
use syntax::attr;
57-
use syntax::symbol::Symbol;
5858

5959
#[macro_use]
6060
mod plumbing;

src/librustc/ty/query/values.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::ty::util::NeedsDrop;
22
use crate::ty::{self, AdtSizedConstraint, Ty, TyCtxt};
33

4-
use syntax::symbol::Symbol;
4+
use rustc_span::symbol::Symbol;
55

66
pub(super) trait Value<'tcx>: Sized {
77
fn from_cycle_error(tcx: TyCtxt<'tcx>) -> Self;

0 commit comments

Comments
 (0)