Normalize `syntax::symbol` imports.

This commit is contained in:
Mazdak Farrokhzad 2020-01-01 19:30:57 +01:00
parent 75e4783f63
commit 4ff12ce4c1
174 changed files with 188 additions and 184 deletions

View File

@ -94,7 +94,7 @@ macro_rules! arena_types {
>
>,
[few] diagnostic_items: rustc_data_structures::fx::FxHashMap<
syntax::symbol::Symbol,
rustc_span::symbol::Symbol,
rustc::hir::def_id::DefId,
>,
[few] resolve_lifetimes: rustc::middle::resolve_lifetime::ResolveLifetimes,
@ -105,7 +105,7 @@ macro_rules! arena_types {
[few] privacy_access_levels: rustc::middle::privacy::AccessLevels,
[few] target_features_whitelist: rustc_data_structures::fx::FxHashMap<
String,
Option<syntax::symbol::Symbol>
Option<rustc_span::symbol::Symbol>
>,
[few] wasm_import_module_map: rustc_data_structures::fx::FxHashMap<
rustc::hir::def_id::DefId,

View File

@ -12,11 +12,12 @@ use crate::lint::builtin::UNUSED_ATTRIBUTES;
use crate::ty::query::Providers;
use crate::ty::TyCtxt;
use rustc_span::Span;
use std::fmt::{self, Display};
use syntax::{attr, symbol::sym};
use rustc_error_codes::*;
use rustc_span::symbol::sym;
use rustc_span::Span;
use syntax::attr;
use std::fmt::{self, Display};
#[derive(Copy, Clone, PartialEq)]
pub(crate) enum MethodKind {

View File

@ -1,4 +1,5 @@
use rustc_span::source_map::{SourceMap, Spanned};
use rustc_span::symbol::kw;
use rustc_span::{self, BytePos, FileName};
use rustc_target::spec::abi::Abi;
use syntax::ast;
@ -6,7 +7,6 @@ use syntax::print::pp::Breaks::{Consistent, Inconsistent};
use syntax::print::pp::{self, Breaks};
use syntax::print::pprust::{self, Comments, PrintState};
use syntax::sess::ParseSess;
use syntax::symbol::kw;
use syntax::util::parser::{self, AssocOp, Fixity};
use crate::hir;

View File

@ -10,9 +10,9 @@ use crate::ty::{fast_reject, TyCtxt};
use std::cmp::Ord;
use rustc_span::source_map::SourceMap;
use rustc_span::symbol::Symbol;
use rustc_span::{BytePos, SourceFile};
use syntax::ast;
use syntax::symbol::Symbol;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};

View File

@ -4,8 +4,8 @@ pub use self::hcx::{
hash_stable_trait_impls, NodeIdHashingMode, StableHashingContext, StableHashingContextProvider,
};
crate use rustc_data_structures::fingerprint::Fingerprint;
use rustc_span::symbol::{sym, Symbol};
pub use rustc_span::CachingSourceMapView;
use syntax::symbol::{sym, Symbol};
mod hcx;

View File

@ -7,9 +7,9 @@ use crate::ty::print::Print;
use crate::ty::{self, DefIdTree, Infer, Ty, TyVar};
use errors::{Applicability, DiagnosticBuilder};
use rustc_span::source_map::DesugaringKind;
use rustc_span::symbol::kw;
use rustc_span::Span;
use std::borrow::Cow;
use syntax::symbol::kw;
use rustc_error_codes::*;

View File

@ -1,7 +1,7 @@
use crate::hir::def_id::DefId;
use crate::ty::{self, Ty, TyVid};
use rustc_span::symbol::Symbol;
use rustc_span::Span;
use syntax::symbol::Symbol;
use rustc_data_structures::snapshot_vec as sv;
use rustc_data_structures::unify as ut;

View File

@ -1,8 +1,8 @@
use crate::ty::{self, FloatVarValue, InferConst, IntVarValue, Ty, TyCtxt};
use rustc_data_structures::unify::InPlace;
use rustc_data_structures::unify::{EqUnifyValue, NoError, UnificationTable, UnifyKey, UnifyValue};
use rustc_span::symbol::Symbol;
use rustc_span::{Span, DUMMY_SP};
use syntax::symbol::Symbol;
use std::cell::RefMut;
use std::cmp;

View File

@ -10,10 +10,10 @@ use crate::session::Session;
use errors::{pluralize, Applicability, DiagnosticBuilder};
use rustc_session::declare_lint;
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
use syntax::ast;
use syntax::early_buffered_lints::{ILL_FORMED_ATTRIBUTE_INPUT, META_VARIABLE_MISUSE};
use syntax::edition::Edition;
use syntax::symbol::Symbol;
declare_lint! {
pub EXCEEDING_BITSHIFTS,

View File

@ -8,8 +8,8 @@ use crate::lint::{
use errors::Applicability;
use rustc_data_structures::fx::FxHashMap;
use rustc_session::declare_tool_lint;
use rustc_span::symbol::{sym, Symbol};
use syntax::ast::{Ident, Item, ItemKind};
use syntax::symbol::{sym, Symbol};
declare_tool_lint! {
pub rustc::DEFAULT_HASH_TYPES,

View File

@ -10,11 +10,11 @@ use crate::util::nodemap::FxHashMap;
use errors::{Applicability, DiagnosticBuilder};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_span::source_map::MultiSpan;
use rustc_span::symbol::{sym, Symbol};
use syntax::ast;
use syntax::attr;
use syntax::feature_gate;
use syntax::print::pprust;
use syntax::symbol::{sym, Symbol};
use rustc_error_codes::*;

View File

@ -34,9 +34,9 @@ use crate::util::nodemap::NodeMap;
use errors::{DiagnosticBuilder, DiagnosticId};
use rustc_span::hygiene::MacroKind;
use rustc_span::source_map::{DesugaringKind, ExpnKind, MultiSpan};
use rustc_span::symbol::Symbol;
use rustc_span::Span;
use syntax::ast;
use syntax::symbol::Symbol;
pub use crate::lint::context::{
check_ast_crate, check_crate, late_lint_mod, BufferedEarlyLint, CheckLintNameResult,

View File

@ -12,13 +12,13 @@ use rustc_data_structures::svh::Svh;
use rustc_data_structures::sync::{self, MetadataRef};
use rustc_macros::HashStable;
use rustc_span::symbol::Symbol;
use rustc_span::Span;
use rustc_target::spec::Target;
use std::any::Any;
use std::path::{Path, PathBuf};
use syntax::ast;
use syntax::expand::allocator::AllocatorKind;
use syntax::symbol::Symbol;
pub use self::NativeLibraryKind::*;
pub use rustc_session::utils::NativeLibraryKind;

View File

@ -19,9 +19,9 @@ use crate::util::nodemap::FxHashMap;
use crate::hir;
use crate::hir::itemlikevisit::ItemLikeVisitor;
use rustc_macros::HashStable;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use syntax::ast;
use syntax::symbol::{sym, Symbol};
use rustc_error_codes::*;

View File

@ -5,7 +5,7 @@ pub mod free_region;
pub mod lang_items;
pub mod lib_features {
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use syntax::symbol::Symbol;
use rustc_span::symbol::Symbol;
#[derive(HashStable)]
pub struct LibFeatures {

View File

@ -6,8 +6,8 @@
// just peeks and looks for that attribute.
use crate::session::Session;
use rustc_span::symbol::{sym, Symbol};
use syntax::ast;
use syntax::symbol::{sym, Symbol};
use rustc_data_structures::sync::Once;

View File

@ -13,12 +13,12 @@ use crate::ty::{self, TyCtxt};
use crate::util::nodemap::{FxHashMap, FxHashSet};
use errors::DiagnosticBuilder;
use rustc_feature::GateIssue;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::{MultiSpan, Span};
use syntax::ast::CRATE_NODE_ID;
use syntax::attr::{self, ConstStability, Deprecation, RustcDeprecation, Stability};
use syntax::errors::Applicability;
use syntax::feature_gate::feature_err_issue;
use syntax::symbol::{sym, Symbol};
use std::num::NonZeroU32;

View File

@ -9,10 +9,10 @@ use crate::hir::intravisit;
use crate::hir::intravisit::{NestedVisitorMap, Visitor};
use crate::ty::TyCtxt;
use rustc_data_structures::fx::FxHashSet;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use rustc_target::spec::PanicStrategy;
use syntax::ast;
use syntax::symbol::{sym, Symbol};
use rustc_error_codes::*;

View File

@ -11,10 +11,10 @@ use backtrace::Backtrace;
use errors::DiagnosticBuilder;
use hir::GeneratorKind;
use rustc_macros::HashStable;
use rustc_span::symbol::Symbol;
use rustc_span::{Pos, Span};
use rustc_target::spec::abi::Abi;
use std::{any::Any, env, fmt};
use syntax::symbol::Symbol;
use rustc_error_codes::*;

View File

@ -27,6 +27,7 @@ use rustc_index::bit_set::BitMatrix;
use rustc_index::vec::{Idx, IndexVec};
use rustc_macros::HashStable;
use rustc_serialize::{Decodable, Encodable};
use rustc_span::symbol::Symbol;
use rustc_span::{Span, DUMMY_SP};
use smallvec::SmallVec;
use std::borrow::Cow;
@ -36,7 +37,6 @@ use std::slice;
use std::{iter, mem, option, u32};
pub use syntax::ast::Mutability;
use syntax::ast::Name;
use syntax::symbol::Symbol;
pub use crate::mir::cache::{BodyAndCache, ReadOnlyBodyAndCache};
pub use crate::mir::interpret::AssertMessage;

View File

@ -9,10 +9,10 @@ use crate::util::nodemap::FxHashMap;
use rustc_data_structures::base_n;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
use std::fmt;
use std::hash::Hash;
use syntax::attr::InlineAttr;
use syntax::symbol::Symbol;
/// Describes how a monomorphization will be instantiated in object files.
#[derive(PartialEq)]

View File

@ -12,8 +12,8 @@ use crate::traits::{self, Normalized, Obligation, ObligationCause, SelectionCont
use crate::ty::fold::TypeFoldable;
use crate::ty::subst::Subst;
use crate::ty::{self, Ty, TyCtxt};
use rustc_span::symbol::sym;
use rustc_span::DUMMY_SP;
use syntax::symbol::sym;
/// Whether we do the orphan check relative to this crate or
/// to some remote crate.

View File

@ -26,10 +26,10 @@ use crate::util::nodemap::{FxHashMap, FxHashSet};
use errors::{pluralize, Applicability, DiagnosticBuilder, Style};
use rustc::hir::def_id::LOCAL_CRATE;
use rustc_span::source_map::SourceMap;
use rustc_span::symbol::{kw, sym};
use rustc_span::{ExpnKind, MultiSpan, Span, DUMMY_SP};
use std::fmt;
use syntax::ast;
use syntax::symbol::{kw, sym};
use rustc_error_codes::*;

View File

@ -16,11 +16,11 @@ use crate::lint;
use crate::traits::{self, Obligation, ObligationCause};
use crate::ty::subst::{InternalSubsts, Subst};
use crate::ty::{self, Predicate, ToPredicate, Ty, TyCtxt, TypeFoldable};
use rustc_span::symbol::Symbol;
use rustc_span::{Span, DUMMY_SP};
use std::borrow::Cow;
use std::iter::{self};
use syntax::ast::{self};
use syntax::symbol::Symbol;
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum ObjectSafetyViolation {

View File

@ -5,10 +5,10 @@ use crate::ty::{self, GenericParamDefKind, TyCtxt};
use crate::util::common::ErrorReported;
use crate::util::nodemap::FxHashMap;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use syntax::ast::{MetaItem, NestedMetaItem};
use syntax::attr;
use syntax::symbol::{kw, sym, Symbol};
use rustc_error_codes::*;

View File

@ -21,9 +21,9 @@ use crate::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt};
use crate::util::common::FN_OUTPUT_NAME;
use rustc_data_structures::snapshot_map::{Snapshot, SnapshotMap};
use rustc_macros::HashStable;
use rustc_span::symbol::sym;
use rustc_span::DUMMY_SP;
use syntax::ast::Ident;
use syntax::symbol::sym;
/// Depending on the stage of compilation, we want projection to be
/// more or less conservative.

View File

@ -42,6 +42,7 @@ use crate::hir;
use crate::util::nodemap::{FxHashMap, FxHashSet};
use rustc_data_structures::sync::Lock;
use rustc_index::bit_set::GrowableBitSet;
use rustc_span::symbol::sym;
use rustc_target::spec::abi::Abi;
use std::cell::{Cell, RefCell};
use std::cmp;
@ -49,7 +50,6 @@ use std::fmt::{self, Display};
use std::iter;
use std::rc::Rc;
use syntax::attr;
use syntax::symbol::sym;
pub struct SelectionContext<'cx, 'tcx> {
infcx: &'cx InferCtxt<'cx, 'tcx>,

View File

@ -3,8 +3,8 @@ use crate::traits::project::Normalized;
use crate::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
use crate::ty::{self, Lift, Ty, TyCtxt};
use chalk_engine;
use rustc_span::symbol::Symbol;
use smallvec::SmallVec;
use syntax::symbol::Symbol;
use std::collections::{BTreeMap, BTreeSet};
use std::fmt;

View File

@ -60,6 +60,7 @@ use rustc_data_structures::sync::{Lock, Lrc, WorkerLocal};
use rustc_index::vec::{Idx, IndexVec};
use rustc_macros::HashStable;
use rustc_span::source_map::MultiSpan;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use rustc_target::spec::abi;
use smallvec::SmallVec;
@ -76,7 +77,6 @@ use std::sync::Arc;
use syntax::ast;
use syntax::attr;
use syntax::expand::allocator::AllocatorKind;
use syntax::symbol::{kw, sym, Symbol};
pub struct AllArenas {
pub interner: SyncDroplessArena,

View File

@ -11,10 +11,10 @@ use crate::ty::{self, DefIdTree, ParamConst, Ty, TyCtxt, TypeFoldable};
use rustc_apfloat::ieee::{Double, Single};
use rustc_apfloat::Float;
use rustc_span::symbol::{kw, Symbol};
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::attr::{SignedInt, UnsignedInt};
use syntax::symbol::{kw, Symbol};
use std::cell::Cell;
use std::collections::BTreeMap;

View File

@ -47,6 +47,7 @@ use rustc_data_structures::sync::Lrc;
use rustc_index::vec::IndexVec;
use rustc_target::spec::PanicStrategy;
use rustc_span::symbol::Symbol;
use rustc_span::{Span, DUMMY_SP};
use std::any::type_name;
use std::borrow::Cow;
@ -54,7 +55,6 @@ use std::ops::Deref;
use std::sync::Arc;
use syntax::ast;
use syntax::attr;
use syntax::symbol::Symbol;
#[macro_use]
mod plumbing;

View File

@ -1,7 +1,7 @@
use crate::ty::util::NeedsDrop;
use crate::ty::{self, AdtSizedConstraint, Ty, TyCtxt};
use syntax::symbol::Symbol;
use rustc_span::symbol::Symbol;
pub(super) trait Value<'tcx>: Sized {
fn from_cycle_error(tcx: TyCtxt<'tcx>) -> Self;

View File

@ -20,6 +20,7 @@ use crate::util::captures::Captures;
use polonius_engine::Atom;
use rustc_index::vec::Idx;
use rustc_macros::HashStable;
use rustc_span::symbol::{kw, Symbol};
use rustc_target::spec::abi;
use smallvec::SmallVec;
use std::borrow::Cow;
@ -27,7 +28,6 @@ use std::cmp::Ordering;
use std::marker::PhantomData;
use std::ops::Range;
use syntax::ast::{self, Ident};
use syntax::symbol::{kw, Symbol};
#[derive(
Clone,

View File

@ -5,9 +5,9 @@ use crate::middle::lang_items;
use crate::traits::{self, AssocTypeBoundData};
use crate::ty::subst::SubstsRef;
use crate::ty::{self, ToPredicate, Ty, TyCtxt, TypeFoldable};
use rustc_span::symbol::{kw, Ident};
use rustc_span::Span;
use std::iter::once;
use syntax::symbol::{kw, Ident};
/// Returns the set of obligations needed to make `ty` well-formed.
/// If `ty` contains unresolved inference variables, this may include

View File

@ -7,7 +7,7 @@ use std::fmt::Debug;
use std::time::{Duration, Instant};
use crate::session::Session;
use syntax::symbol::{sym, Symbol};
use rustc_span::symbol::{sym, Symbol};
#[cfg(test)]
mod tests;

View File

@ -5,10 +5,10 @@ use State::*;
use errors::{DiagnosticBuilder, PResult};
use rustc_expand::base::*;
use rustc_parse::parser::Parser;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use syntax::ast::{self, AsmDialect};
use syntax::ptr::P;
use syntax::symbol::{kw, sym, Symbol};
use syntax::token::{self, Token};
use syntax::tokenstream::{self, TokenStream};
use syntax::{span_err, struct_span_err};

View File

@ -2,11 +2,11 @@ use errors::{Applicability, DiagnosticBuilder};
use rustc_expand::base::*;
use rustc_parse::parser::Parser;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::{Span, DUMMY_SP};
use syntax::ast::{self, *};
use syntax::print::pprust;
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
use syntax::token::{self, TokenKind};
use syntax::tokenstream::{DelimSpan, TokenStream, TokenTree};

View File

@ -1,6 +1,6 @@
use rustc_expand::base::{self, DummyResult};
use rustc_span::symbol::Symbol;
use syntax::ast;
use syntax::symbol::Symbol;
use syntax::tokenstream::TokenStream;
use std::string::String;

View File

@ -3,10 +3,10 @@ use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use syntax::ast::{self, Expr, GenericArg, Generics, ItemKind, MetaItem, VariantData};
use syntax::ptr::P;
use syntax::symbol::{kw, sym, Symbol};
pub fn expand_deriving_clone(
cx: &mut ExtCtxt<'_>,

View File

@ -3,10 +3,10 @@ use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use syntax::ast::{self, Expr, GenericArg, Ident, MetaItem};
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
pub fn expand_deriving_eq(
cx: &mut ExtCtxt<'_>,

View File

@ -3,10 +3,10 @@ use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::sym;
use rustc_span::Span;
use syntax::ast::{self, Expr, MetaItem};
use syntax::ptr::P;
use syntax::symbol::sym;
pub fn expand_deriving_ord(
cx: &mut ExtCtxt<'_>,

View File

@ -3,10 +3,10 @@ use crate::deriving::generic::*;
use crate::deriving::{path_local, path_std};
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::sym;
use rustc_span::Span;
use syntax::ast::{BinOpKind, Expr, MetaItem};
use syntax::ptr::P;
use syntax::symbol::sym;
pub fn expand_deriving_partial_eq(
cx: &mut ExtCtxt<'_>,

View File

@ -5,10 +5,10 @@ use crate::deriving::generic::*;
use crate::deriving::{path_local, path_std, pathvec_std};
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use syntax::ast::{self, BinOpKind, Expr, MetaItem};
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
pub fn expand_deriving_partial_ord(
cx: &mut ExtCtxt<'_>,

View File

@ -3,11 +3,11 @@ use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::sym;
use rustc_span::{Span, DUMMY_SP};
use syntax::ast::{self, Ident};
use syntax::ast::{Expr, MetaItem};
use syntax::ptr::P;
use syntax::symbol::sym;
pub fn expand_deriving_debug(
cx: &mut ExtCtxt<'_>,

View File

@ -5,11 +5,11 @@ use crate::deriving::generic::*;
use crate::deriving::pathvec_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::Symbol;
use rustc_span::Span;
use syntax::ast;
use syntax::ast::{Expr, MetaItem, Mutability};
use syntax::ptr::P;
use syntax::symbol::Symbol;
pub fn expand_deriving_rustc_decodable(
cx: &mut ExtCtxt<'_>,

View File

@ -3,11 +3,11 @@ use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, DummyResult, ExtCtxt};
use rustc_span::symbol::{kw, sym};
use rustc_span::Span;
use syntax::ast::{Expr, MetaItem};
use syntax::ptr::P;
use syntax::span_err;
use syntax::symbol::{kw, sym};
use rustc_error_codes::*;

View File

@ -90,10 +90,10 @@ use crate::deriving::generic::*;
use crate::deriving::pathvec_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::Symbol;
use rustc_span::Span;
use syntax::ast::{Expr, ExprKind, MetaItem, Mutability};
use syntax::ptr::P;
use syntax::symbol::Symbol;
pub fn expand_deriving_rustc_encodable(
cx: &mut ExtCtxt<'_>,

View File

@ -183,13 +183,13 @@ use std::vec;
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::source_map::respan;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use syntax::ast::{self, BinOpKind, EnumDef, Expr, Generics, Ident, PatKind};
use syntax::ast::{GenericArg, GenericParamKind, VariantData};
use syntax::attr;
use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym, Symbol};
use syntax::util::map_in_place::MapInPlace;
use ty::{LifetimeBounds, Path, Ptr, PtrTy, Self_, Ty};

View File

@ -3,10 +3,10 @@ use crate::deriving::generic::*;
use crate::deriving::{self, path_std, pathvec_std};
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::sym;
use rustc_span::Span;
use syntax::ast::{Expr, MetaItem, Mutability};
use syntax::ptr::P;
use syntax::symbol::sym;
pub fn expand_deriving_hash(
cx: &mut ExtCtxt<'_>,

View File

@ -1,10 +1,10 @@
//! The compiler code necessary to implement the `#[derive]` extensions.
use rustc_expand::base::{Annotatable, ExtCtxt, MultiItemModifier};
use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use syntax::ast::{self, ItemKind, MetaItem};
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
macro path_local($x:ident) {
generic::ty::Path::new_local(stringify!($x))

View File

@ -4,9 +4,9 @@
//
use rustc_expand::base::{self, *};
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use syntax::ast::{self, GenericArg, Ident};
use syntax::symbol::{kw, sym, Symbol};
use syntax::tokenstream::TokenStream;
use std::env;

View File

@ -8,10 +8,10 @@ use errors::Applicability;
use errors::DiagnosticBuilder;
use rustc_expand::base::{self, *};
use rustc_span::symbol::{sym, Symbol};
use rustc_span::{MultiSpan, Span};
use syntax::ast;
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
use syntax::token;
use syntax::tokenstream::TokenStream;

View File

@ -1,12 +1,12 @@
use crate::util::check_builtin_macro_attribute;
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use syntax::ast::{self, Attribute, Expr, FnHeader, FnSig, Generics, Ident, Param};
use syntax::ast::{ItemKind, Mutability, Stmt, Ty, TyKind, Unsafety};
use syntax::expand::allocator::{AllocatorKind, AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS};
use syntax::ptr::P;
use syntax::symbol::{kw, sym, Symbol};
pub fn expand(
ecx: &mut ExtCtxt<'_>,

View File

@ -15,9 +15,9 @@ use crate::deriving::*;
use rustc_expand::base::{MacroExpanderFn, Resolver, SyntaxExtension, SyntaxExtensionKind};
use rustc_expand::proc_macro::BangProcMacro;
use rustc_span::symbol::sym;
use syntax::ast::Ident;
use syntax::edition::Edition;
use syntax::symbol::sym;
mod asm;
mod assert;

View File

@ -3,6 +3,7 @@ use std::mem;
use rustc_expand::base::{ExtCtxt, Resolver};
use rustc_expand::expand::{AstFragment, ExpansionConfig};
use rustc_span::hygiene::AstPass;
use rustc_span::symbol::{kw, sym};
use rustc_span::{Span, DUMMY_SP};
use smallvec::smallvec;
use syntax::ast::{self, Ident};
@ -11,7 +12,6 @@ use syntax::expand::is_proc_macro_attr;
use syntax::print::pprust;
use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym};
use syntax::visit::{self, Visitor};
struct ProcMacroDerive {

View File

@ -1,11 +1,11 @@
use rustc_expand::base::{self, *};
use rustc_expand::panictry;
use rustc_parse::{self, new_sub_parser_from_file, parser::Parser, DirectoryOwnership};
use rustc_span::symbol::Symbol;
use syntax::ast;
use syntax::early_buffered_lints::INCOMPLETE_INCLUDE;
use syntax::print::pprust;
use syntax::ptr::P;
use syntax::symbol::Symbol;
use syntax::token;
use syntax::tokenstream::TokenStream;

View File

@ -1,11 +1,11 @@
use rustc_expand::base::{ExtCtxt, Resolver};
use rustc_expand::expand::ExpansionConfig;
use rustc_span::hygiene::AstPass;
use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::DUMMY_SP;
use syntax::edition::Edition;
use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym, Ident, Symbol};
use syntax::{ast, attr};
pub fn inject(

View File

@ -4,11 +4,11 @@ use crate::util::check_builtin_macro_attribute;
use rustc_expand::base::*;
use rustc_span::source_map::respan;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use syntax::ast;
use syntax::attr;
use syntax::print::pprust;
use syntax::symbol::{sym, Symbol};
use std::iter;

View File

@ -6,6 +6,7 @@ use rustc_expand::expand::{AstFragment, ExpansionConfig};
use rustc_feature::Features;
use rustc_span::hygiene::{AstPass, SyntaxContext, Transparency};
use rustc_span::source_map::respan;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::{Span, DUMMY_SP};
use rustc_target::spec::PanicStrategy;
use smallvec::{smallvec, SmallVec};
@ -15,7 +16,6 @@ use syntax::entry::{self, EntryPointType};
use syntax::mut_visit::{ExpectOne, *};
use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::symbol::{sym, Symbol};
use std::{iter, mem};

View File

@ -1,6 +1,6 @@
use rustc_expand::base::{self, ExtCtxt};
use rustc_span::symbol::kw;
use rustc_span::Span;
use syntax::symbol::kw;
use syntax::tokenstream::{TokenStream, TokenTree};
pub fn expand_trace_macros(

View File

@ -12,7 +12,7 @@ use crate::llvm::{self, ArchiveKind};
use rustc::session::Session;
use rustc_codegen_ssa::back::archive::{find_library, ArchiveBuilder};
use rustc_codegen_ssa::{looks_like_rust_object_file, METADATA_FILENAME, RLIB_BYTECODE_EXTENSION};
use syntax::symbol::Symbol;
use rustc_span::symbol::Symbol;
struct ArchiveConfig<'a> {
pub sess: &'a Session,

View File

@ -18,8 +18,8 @@ use rustc_codegen_ssa::mir::place::PlaceRef;
use libc::{c_char, c_uint};
use rustc_span::symbol::Symbol;
use syntax::ast::Mutability;
use syntax::symbol::Symbol;
pub use crate::context::CodegenCx;

View File

@ -14,9 +14,9 @@ use rustc::mir::mono::MonoItem;
use rustc::ty::{self, Instance, Ty};
use rustc::{bug, span_bug};
use rustc_codegen_ssa::traits::*;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use rustc_target::abi::HasDataLayout;
use syntax::symbol::{sym, Symbol};
use rustc::ty::layout::{self, Align, LayoutOf, Size};

View File

@ -28,12 +28,12 @@ use rustc_target::spec::{HasTargetSpec, Target};
use crate::abi::Abi;
use rustc_span::source_map::{Span, DUMMY_SP};
use rustc_span::symbol::Symbol;
use std::cell::{Cell, RefCell};
use std::ffi::CStr;
use std::iter;
use std::str;
use std::sync::Arc;
use syntax::symbol::Symbol;
/// There is one `CodegenCx` per compilation unit. Each one has its own LLVM
/// `llvm::Context` so that several compilation units may be optimized in parallel.

View File

@ -9,8 +9,8 @@ use rustc::bug;
use rustc::session::config::DebugInfo;
use rustc_codegen_ssa::traits::*;
use rustc_span::symbol::sym;
use syntax::attr;
use syntax::symbol::sym;
/// Inserts a side-effect free instruction sequence that makes sure that the
/// .debug_gdb_scripts global is referenced, so it isn't removed by the linker.

View File

@ -42,10 +42,10 @@ use rustc_data_structures::small_c_str::SmallCStr;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_fs_util::path_to_c_string;
use rustc_index::vec::{Idx, IndexVec};
use rustc_span::symbol::{Interner, Symbol};
use rustc_span::{self, FileName, Span};
use rustc_target::abi::HasDataLayout;
use syntax::ast;
use syntax::symbol::{Interner, Symbol};
use libc::{c_longlong, c_uint};
use std::collections::hash_map::Entry;

View File

@ -37,10 +37,10 @@ use std::ffi::CString;
use rustc::ty::layout::{self, HasTyCtxt, LayoutOf, Size};
use rustc_codegen_ssa::traits::*;
use rustc_span::symbol::Symbol;
use rustc_span::{self, BytePos, Pos, Span};
use smallvec::SmallVec;
use syntax::ast;
use syntax::symbol::Symbol;
mod create_scope_map;
pub mod gdb;

View File

@ -6,10 +6,10 @@ use rustc::session::config::PrintRequest;
use rustc::session::Session;
use rustc_data_structures::fx::FxHashSet;
use rustc_feature::UnstableFeatures;
use rustc_span::symbol::sym;
use rustc_span::symbol::Symbol;
use rustc_target::spec::{MergeFunctions, PanicStrategy};
use std::ffi::CString;
use syntax::symbol::sym;
use std::slice;
use std::str;

View File

@ -1,5 +1,5 @@
use rustc::session::Session;
use syntax::symbol::Symbol;
use rustc_span::symbol::Symbol;
use std::io;
use std::path::{Path, PathBuf};

View File

@ -7,8 +7,8 @@ use std::io;
use std::mem;
use std::process::{self, Output};
use rustc_span::symbol::Symbol;
use rustc_target::spec::LldFlavor;
use syntax::symbol::Symbol;
#[derive(Clone)]
pub struct Command {

View File

@ -11,8 +11,8 @@ use rustc::session::{filesearch, Session};
use rustc::util::common::{time, time_ext};
use rustc_data_structures::fx::FxHashSet;
use rustc_fs_util::fix_windows_verbatim_for_gcc;
use rustc_span::symbol::Symbol;
use rustc_target::spec::{LinkerFlavor, PanicStrategy, RelroLevel};
use syntax::symbol::Symbol;
use super::archive::ArchiveBuilder;
use super::command::Command;

View File

@ -15,8 +15,8 @@ use rustc::session::config::{self, CrateType, DebugInfo, LinkerPluginLto, Lto, O
use rustc::session::Session;
use rustc::ty::TyCtxt;
use rustc_serialize::{json, Encoder};
use rustc_span::symbol::Symbol;
use rustc_target::spec::{LinkerFlavor, LldFlavor};
use syntax::symbol::Symbol;
/// For all the linkers we support, and information they might
/// need out of the shared crate context before we get rid of it.

View File

@ -6,8 +6,8 @@ use rustc::ty::layout::{LayoutOf, Size};
use rustc::ty::TyCtxt;
use rustc_index::vec::IndexVec;
use rustc_span::symbol::kw;
use rustc_span::{BytePos, Span};
use syntax::symbol::kw;
use super::OperandValue;
use super::{FunctionCx, LocalRef};

View File

@ -14,7 +14,7 @@ use rustc::ty::layout::{self, HasTyCtxt, LayoutOf};
use rustc::ty::{self, adjustment::PointerCast, Instance, Ty, TyCtxt};
use rustc_apfloat::{ieee, Float, Round, Status};
use rustc_span::source_map::{Span, DUMMY_SP};
use syntax::symbol::sym;
use rustc_span::symbol::sym;
use std::{i128, u128};

View File

@ -15,7 +15,7 @@ use rustc::session::Session;
use rustc::ty::query::Providers;
use rustc::ty::TyCtxt;
use rustc::util::common::ErrorReported;
use syntax::symbol::Symbol;
use rustc_span::symbol::Symbol;
pub use rustc_data_structures::sync::MetadataRef;

View File

@ -18,7 +18,7 @@ extern crate rustc;
use rustc::hir::def_id::{DefId, LOCAL_CRATE};
use rustc::ty::query::Providers;
use rustc::ty::TyCtxt;
use syntax::symbol::sym;
use rustc_span::symbol::sym;
pub mod codegen_backend;
pub mod link;

View File

@ -1,8 +1,8 @@
use rustc::session::config::{self, Input, OutputFilenames, OutputType};
use rustc::session::Session;
use rustc_span::symbol::sym;
use rustc_span::Span;
use std::path::{Path, PathBuf};
use syntax::symbol::sym;
use syntax::{ast, attr};
pub fn out_filename(

View File

@ -6,7 +6,7 @@
use rustc::hir;
use rustc::ty::{Instance, TyCtxt};
use syntax::symbol::{sym, Symbol};
use rustc_span::symbol::{sym, Symbol};
const SYMBOL_NAME: Symbol = sym::rustc_symbol_name;
const DEF_PATH: Symbol = sym::rustc_def_path;

View File

@ -2,13 +2,13 @@ use crate::expand::{self, AstFragment, Invocation};
use rustc_parse::{self, parser, DirectoryOwnership, MACRO_ARGUMENTS};
use rustc_span::source_map::SourceMap;
use rustc_span::symbol::{kw, sym, Ident, Symbol};
use syntax::ast::{self, Attribute, Name, NodeId, PatKind};
use syntax::attr::{self, Deprecation, HasAttrs, Stability};
use syntax::edition::Edition;
use syntax::mut_visit::{self, MutVisitor};
use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym, Ident, Symbol};
use syntax::token;
use syntax::tokenstream::{self, TokenStream};
use syntax::visit::Visitor;

View File

@ -1,10 +1,10 @@
use crate::base::ExtCtxt;
use rustc_span::source_map::{respan, Spanned};
use rustc_span::symbol::{kw, sym, Symbol};
use syntax::ast::{self, AttrVec, BlockCheckMode, Expr, Ident, PatKind, UnOp};
use syntax::attr;
use syntax::ptr::P;
use syntax::symbol::{kw, sym, Symbol};
use rustc_span::{Pos, Span};

View File

@ -11,6 +11,7 @@ use rustc_parse::parser::Parser;
use rustc_parse::validate_attr;
use rustc_parse::DirectoryOwnership;
use rustc_span::source_map::respan;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::{FileName, Span, DUMMY_SP};
use syntax::ast::{self, AttrItem, Block, Ident, LitKind, NodeId, PatKind, Path};
use syntax::ast::{ItemKind, MacArgs, MacStmtStyle, StmtKind};
@ -20,7 +21,6 @@ use syntax::mut_visit::*;
use syntax::print::pprust;
use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::symbol::{sym, Symbol};
use syntax::token;
use syntax::tokenstream::{TokenStream, TokenTree};
use syntax::util::map_in_place::MapInPlace;

View File

@ -106,10 +106,10 @@
//! bound.
use crate::mbe::{KleeneToken, TokenTree};
use rustc_span::symbol::{kw, sym};
use syntax::ast::NodeId;
use syntax::early_buffered_lints::META_VARIABLE_MISUSE;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym};
use syntax::token::{DelimToken, Token, TokenKind};
use rustc_data_structures::fx::FxHashMap;

View File

@ -78,10 +78,10 @@ use crate::mbe::{self, TokenTree};
use rustc_parse::parser::{FollowedByType, Parser, PathStyle};
use rustc_parse::Directory;
use rustc_span::symbol::{kw, sym, Symbol};
use syntax::ast::{Ident, Name};
use syntax::print::pprust;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym, Symbol};
use syntax::token::{self, DocComment, Nonterminal, Token};
use syntax::tokenstream::TokenStream;

View File

@ -12,13 +12,13 @@ use rustc_feature::Features;
use rustc_parse::parser::Parser;
use rustc_parse::Directory;
use rustc_span::hygiene::Transparency;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use syntax::ast;
use syntax::attr::{self, TransparencyError};
use syntax::edition::Edition;
use syntax::print::pprust;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym, Symbol};
use syntax::token::{self, NtTT, Token, TokenKind::*};
use syntax::tokenstream::{DelimSpan, TokenStream};

View File

@ -1,10 +1,10 @@
use crate::mbe::macro_parser;
use crate::mbe::{Delimited, KleeneOp, KleeneToken, SequenceRepetition, TokenTree};
use rustc_span::symbol::kw;
use syntax::ast;
use syntax::print::pprust;
use syntax::sess::ParseSess;
use syntax::symbol::kw;
use syntax::token::{self, Token};
use syntax::tokenstream;

View File

@ -3,12 +3,12 @@ use crate::tests::{matches_codepattern, string_to_stream, with_error_checking_pa
use errors::PResult;
use rustc_parse::new_parser_from_source_str;
use rustc_span::source_map::FilePathMapping;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::{BytePos, FileName, Pos, Span};
use syntax::ast::{self, Name, PatKind};
use syntax::print::pprust::item_to_string;
use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym, Symbol};
use syntax::token::{self, Token};
use syntax::tokenstream::{DelimSpan, TokenStream, TokenTree};
use syntax::visit;

View File

@ -1,9 +1,9 @@
use crate::base::{self, *};
use crate::proc_macro_server;
use rustc_span::symbol::sym;
use syntax::ast::{self, ItemKind, MetaItemKind, NestedMetaItem};
use syntax::errors::{Applicability, FatalError};
use syntax::symbol::sym;
use syntax::token;
use syntax::tokenstream::{self, TokenStream};

View File

@ -42,11 +42,13 @@ use rustc::hir::intravisit::{self, NestedVisitorMap, Visitor};
use rustc::ty::TyCtxt;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::graph::implementation::{Direction, NodeIndex, INCOMING, OUTGOING};
use rustc_span::symbol::sym;
use rustc_span::Span;
use syntax::ast;
use std::env;
use std::fs::{self, File};
use std::io::Write;
use syntax::{ast, symbol::sym};
pub fn assert_dep_graph(tcx: TyCtxt<'_>) {
tcx.dep_graph.with_ignore(|| {

View File

@ -25,9 +25,9 @@ use rustc::hir::def_id::LOCAL_CRATE;
use rustc::mir::mono::CodegenUnitNameBuilder;
use rustc::ty::TyCtxt;
use rustc_session::cgu_reuse_tracker::*;
use rustc_span::symbol::{sym, Symbol};
use std::collections::BTreeSet;
use syntax::ast;
use syntax::symbol::{sym, Symbol};
pub fn assert_module_sources(tcx: TyCtxt<'_>) {
tcx.dep_graph.with_ignore(|| {

View File

@ -23,11 +23,11 @@ use rustc::hir::{ImplItemKind, ItemKind as HirItem, TraitItemKind};
use rustc::ty::TyCtxt;
use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::fx::FxHashSet;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use std::iter::FromIterator;
use std::vec::Vec;
use syntax::ast::{self, Attribute, NestedMetaItem};
use syntax::symbol::{sym, Symbol};
const EXCEPT: Symbol = sym::except;
const LABEL: Symbol = sym::label;

View File

@ -33,12 +33,12 @@ use rustc_passes::{self, ast_validation, hir_stats, layout_test};
use rustc_plugin_impl as plugin;
use rustc_privacy;
use rustc_resolve::{Resolver, ResolverArenas};
use rustc_span::symbol::Symbol;
use rustc_span::FileName;
use rustc_traits;
use rustc_typeck as typeck;
use syntax::early_buffered_lints::BufferedEarlyLint;
use syntax::mut_visit::MutVisitor;
use syntax::symbol::Symbol;
use syntax::util::node_count::NodeCounter;
use syntax::{self, ast, visit};

View File

@ -3,8 +3,8 @@ use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc::hir::itemlikevisit::ItemLikeVisitor;
use rustc::ty::query::Providers;
use rustc::ty::TyCtxt;
use rustc_span::symbol::sym;
use syntax::attr;
use syntax::symbol::sym;
pub fn find(tcx: TyCtxt<'_>) -> Option<DefId> {
tcx.proc_macro_decls_static(LOCAL_CRATE)

View File

@ -12,13 +12,13 @@ use rustc::session::search_paths::SearchPath;
use rustc::session::{build_session, Session};
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::{emitter::HumanReadableErrorType, registry, ColorConfig};
use rustc_span::symbol::sym;
use rustc_target::spec::{MergeFunctions, PanicStrategy, RelroLevel};
use std::collections::{BTreeMap, BTreeSet};
use std::iter::FromIterator;
use std::path::PathBuf;
use syntax;
use syntax::edition::{Edition, DEFAULT_EDITION};
use syntax::symbol::sym;
type CfgSpecs = FxHashSet<(String, Option<String>)>;

View File

@ -16,6 +16,7 @@ use rustc_metadata::dynamic_lib::DynamicLibrary;
use rustc_resolve::{self, Resolver};
use rustc_span::edition::Edition;
use rustc_span::source_map::{FileLoader, RealFileLoader, SourceMap};
use rustc_span::symbol::{sym, Symbol};
use smallvec::SmallVec;
use std::env;
use std::io::{self, Write};
@ -28,7 +29,6 @@ use std::{panic, thread};
use syntax::ast::{AttrVec, BlockCheckMode};
use syntax::mut_visit::{visit_clobber, MutVisitor, *};
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
use syntax::util::lev_distance::find_best_match_for_name;
use syntax::{self, ast, attr};

View File

@ -7,7 +7,8 @@ use rustc::{
adjustment::{Adjust, Adjustment},
},
};
use syntax::{errors::Applicability, symbol::sym};
use rustc_span::symbol::sym;
use syntax::errors::Applicability;
declare_lint! {
pub ARRAY_INTO_ITER,

View File

@ -38,6 +38,7 @@ use rustc_feature::Stability;
use rustc_feature::{deprecated_attributes, AttributeGate, AttributeTemplate, AttributeType};
use rustc_span::source_map::Spanned;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::{BytePos, Span};
use syntax::ast::{self, Expr};
use syntax::attr::{self, HasAttrs};
@ -45,7 +46,6 @@ use syntax::edition::Edition;
use syntax::errors::{Applicability, DiagnosticBuilder};
use syntax::print::pprust::{self, expr_to_string};
use syntax::ptr::P;
use syntax::symbol::{kw, sym, Symbol};
use syntax::tokenstream::{TokenStream, TokenTree};
use syntax::visit::FnKind;

View File

@ -5,12 +5,12 @@ use rustc::hir::intravisit::FnKind;
use rustc::hir::{self, GenericParamKind, PatKind};
use rustc::lint;
use rustc::ty;
use rustc_span::symbol::sym;
use rustc_span::{symbol::Ident, BytePos, Span};
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::attr;
use syntax::errors::Applicability;
use syntax::symbol::sym;
#[derive(PartialEq)]
pub enum MethodLateContext {

View File

@ -10,13 +10,13 @@ use rustc::ty::{self, Ty};
use rustc_data_structures::fx::FxHashMap;
use rustc_feature::{AttributeType, BuiltinAttribute, BUILTIN_ATTRIBUTE_MAP};
use rustc_span::symbol::Symbol;
use rustc_span::symbol::{kw, sym};
use rustc_span::{BytePos, Span};
use syntax::ast;
use syntax::attr;
use syntax::errors::{pluralize, Applicability};
use syntax::print::pprust;
use syntax::symbol::Symbol;
use syntax::symbol::{kw, sym};
use syntax::util::parser;
use log::debug;

View File

@ -23,13 +23,13 @@ use std::{cmp, fs};
use log::{debug, info, log_enabled};
use proc_macro::bridge::client::ProcMacro;
use rustc_expand::base::SyntaxExtension;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::{Span, DUMMY_SP};
use syntax::ast;
use syntax::attr;
use syntax::edition::Edition;
use syntax::expand::allocator::{global_allocator_spans, AllocatorKind};
use syntax::span_fatal;
use syntax::symbol::{sym, Symbol};
use rustc_error_codes::*;

View File

@ -1,8 +1,8 @@
use rustc::hir;
use rustc::hir::itemlikevisit::ItemLikeVisitor;
use rustc::ty::TyCtxt;
use rustc_span::symbol::sym;
use rustc_target::spec::abi::Abi;
use syntax::symbol::sym;
crate fn collect(tcx: TyCtxt<'_>) -> Vec<String> {
let mut collector = Collector { args: Vec::new() };

Some files were not shown because too many files have changed in this diff Show More