Normalize syntax::source_map
imports.
This commit is contained in:
parent
766fba3fdc
commit
75e4783f63
83 changed files with 122 additions and 131 deletions
|
@ -11,10 +11,10 @@ use crate::session::Session;
|
|||
use crate::util::nodemap::FxHashMap;
|
||||
use rustc_data_structures::svh::Svh;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::Span;
|
||||
use std::iter::repeat;
|
||||
use syntax::ast::NodeId;
|
||||
use syntax::source_map::SourceMap;
|
||||
|
||||
use crate::ich::StableHashingContext;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
|
|
|
@ -17,10 +17,10 @@ use crate::util::nodemap::FxHashMap;
|
|||
use rustc_data_structures::svh::Svh;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_span::hygiene::MacroKind;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::ast::{self, Name, NodeId};
|
||||
use syntax::source_map::Spanned;
|
||||
|
||||
pub mod blocks;
|
||||
mod collector;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use rustc_span::source_map::{SourceMap, Spanned};
|
||||
use rustc_span::{self, BytePos, FileName};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::ast;
|
||||
|
@ -5,7 +6,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::source_map::{SourceMap, Spanned};
|
||||
use syntax::symbol::kw;
|
||||
use syntax::util::parser::{self, AssocOp, Fixity};
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ use crate::ty::{fast_reject, TyCtxt};
|
|||
|
||||
use std::cmp::Ord;
|
||||
|
||||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::{BytePos, SourceFile};
|
||||
use syntax::ast;
|
||||
use syntax::source_map::SourceMap;
|
||||
use syntax::symbol::Symbol;
|
||||
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
|
|
|
@ -30,9 +30,9 @@ use crate::ty::{self, BoundVar, List, Region, TyCtxt};
|
|||
use rustc_index::vec::IndexVec;
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_serialize::UseSpecializedDecodable;
|
||||
use rustc_span::source_map::Span;
|
||||
use smallvec::SmallVec;
|
||||
use std::ops::Index;
|
||||
use syntax::source_map::Span;
|
||||
|
||||
mod canonicalizer;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ use crate::infer::InferCtxt;
|
|||
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::Span;
|
||||
use std::borrow::Cow;
|
||||
use syntax::source_map::DesugaringKind;
|
||||
use syntax::symbol::kw;
|
||||
|
||||
use rustc_error_codes::*;
|
||||
|
|
|
@ -4,7 +4,7 @@ use crate::infer::InferCtxt;
|
|||
use crate::ty::{self, TyCtxt};
|
||||
use crate::util::common::ErrorReported;
|
||||
use errors::DiagnosticBuilder;
|
||||
use syntax::source_map::Span;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
mod different_lifetimes;
|
||||
mod find_anon_type;
|
||||
|
|
|
@ -9,10 +9,10 @@ use crate::middle::stability;
|
|||
use crate::session::Session;
|
||||
use errors::{pluralize, Applicability, DiagnosticBuilder};
|
||||
use rustc_session::declare_lint;
|
||||
use rustc_span::source_map::Span;
|
||||
use syntax::ast;
|
||||
use syntax::early_buffered_lints::{ILL_FORMED_ATTRIBUTE_INPUT, META_VARIABLE_MISUSE};
|
||||
use syntax::edition::Edition;
|
||||
use syntax::source_map::Span;
|
||||
use syntax::symbol::Symbol;
|
||||
|
||||
declare_lint! {
|
||||
|
|
|
@ -9,11 +9,11 @@ use crate::session::Session;
|
|||
use crate::util::nodemap::FxHashMap;
|
||||
use errors::{Applicability, DiagnosticBuilder};
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_span::source_map::MultiSpan;
|
||||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
use syntax::feature_gate;
|
||||
use syntax::print::pprust;
|
||||
use syntax::source_map::MultiSpan;
|
||||
use syntax::symbol::{sym, Symbol};
|
||||
|
||||
use rustc_error_codes::*;
|
||||
|
|
|
@ -33,9 +33,9 @@ use crate::ty::TyCtxt;
|
|||
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::Span;
|
||||
use syntax::ast;
|
||||
use syntax::source_map::{DesugaringKind, ExpnKind, MultiSpan};
|
||||
use syntax::symbol::Symbol;
|
||||
|
||||
pub use crate::lint::context::{
|
||||
|
|
|
@ -8,10 +8,10 @@ use crate::ty::{subst::InternalSubsts, Instance, InstanceDef, SymbolName, TyCtxt
|
|||
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 std::fmt;
|
||||
use std::hash::Hash;
|
||||
use syntax::attr::InlineAttr;
|
||||
use syntax::source_map::Span;
|
||||
use syntax::symbol::Symbol;
|
||||
|
||||
/// Describes how a monomorphization will be instantiated in object files.
|
||||
|
|
|
@ -3,8 +3,8 @@ use crate::infer::canonical::OriginalQueryValues;
|
|||
use crate::infer::InferOk;
|
||||
use crate::ty::subst::GenericArg;
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc_span::source_map::Span;
|
||||
use std::iter::FromIterator;
|
||||
use syntax::source_map::Span;
|
||||
|
||||
use rustc_error_codes::*;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use crate::infer::InferCtxt;
|
|||
use crate::traits::query::NoSolution;
|
||||
use crate::traits::{FulfillmentContext, ObligationCause, TraitEngine, TraitEngineExt};
|
||||
use crate::ty::{self, Ty};
|
||||
use syntax::source_map::Span;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
use crate::ich::StableHashingContext;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
|
|
|
@ -5,8 +5,8 @@ use std::fmt;
|
|||
use crate::infer::canonical::query_response;
|
||||
use crate::infer::canonical::QueryRegionConstraints;
|
||||
use crate::traits::{ObligationCause, TraitEngine, TraitEngineExt};
|
||||
use rustc_span::source_map::DUMMY_SP;
|
||||
use std::rc::Rc;
|
||||
use syntax::source_map::DUMMY_SP;
|
||||
|
||||
pub struct CustomTypeOp<F, G> {
|
||||
closure: F,
|
||||
|
|
|
@ -59,6 +59,7 @@ use rustc_data_structures::stable_hasher::{
|
|||
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::Span;
|
||||
use rustc_target::spec::abi;
|
||||
use smallvec::SmallVec;
|
||||
|
@ -75,7 +76,6 @@ use std::sync::Arc;
|
|||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
use syntax::expand::allocator::AllocatorKind;
|
||||
use syntax::source_map::MultiSpan;
|
||||
use syntax::symbol::{kw, sym, Symbol};
|
||||
|
||||
pub struct AllArenas {
|
||||
|
|
|
@ -21,10 +21,10 @@ use rustc_serialize::{
|
|||
UseSpecializedDecodable, UseSpecializedEncodable,
|
||||
};
|
||||
use rustc_span::hygiene::{ExpnId, SyntaxContext};
|
||||
use rustc_span::source_map::{SourceMap, StableSourceFileId};
|
||||
use rustc_span::{BytePos, SourceFile, Span, DUMMY_SP};
|
||||
use std::mem;
|
||||
use syntax::ast::{Ident, NodeId};
|
||||
use syntax::source_map::{SourceMap, StableSourceFileId};
|
||||
|
||||
const TAG_FILE_FOOTER: u128 = 0xC0FFEE_C0FFEE_C0FFEE_C0FFEE_C0FFEE;
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@ use rustc_data_structures::fx::{FxHashMap, FxHasher};
|
|||
use rustc_data_structures::sharded::Sharded;
|
||||
use rustc_data_structures::sync::{Lock, Lrc};
|
||||
use rustc_data_structures::thin_vec::ThinVec;
|
||||
use rustc_span::source_map::DUMMY_SP;
|
||||
use rustc_span::Span;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use syntax::source_map::DUMMY_SP;
|
||||
|
||||
use rustc_error_codes::*;
|
||||
|
||||
|
|
|
@ -182,13 +182,13 @@ use std::iter;
|
|||
use std::vec;
|
||||
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::source_map::respan;
|
||||
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::source_map::respan;
|
||||
use syntax::symbol::{kw, sym, Symbol};
|
||||
use syntax::util::map_in_place::MapInPlace;
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ pub use PtrTy::*;
|
|||
pub use Ty::*;
|
||||
|
||||
use rustc_expand::base::ExtCtxt;
|
||||
use rustc_span::source_map::{respan, DUMMY_SP};
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, Expr, GenericArg, GenericParamKind, Generics, Ident, SelfKind};
|
||||
use syntax::ptr::P;
|
||||
use syntax::source_map::{respan, DUMMY_SP};
|
||||
|
||||
/// The types of pointers
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
use errors::DiagnosticBuilder;
|
||||
|
||||
use rustc_expand::base::{self, *};
|
||||
use rustc_span::source_map::respan;
|
||||
use rustc_span::Span;
|
||||
use smallvec::smallvec;
|
||||
use syntax::ast;
|
||||
use syntax::ptr::P;
|
||||
use syntax::source_map::respan;
|
||||
use syntax::token;
|
||||
use syntax::tokenstream::TokenStream;
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
use crate::util::check_builtin_macro_attribute;
|
||||
|
||||
use rustc_expand::base::*;
|
||||
use rustc_span::source_map::respan;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
use syntax::print::pprust;
|
||||
use syntax::source_map::respan;
|
||||
use syntax::symbol::{sym, Symbol};
|
||||
|
||||
use std::iter;
|
||||
|
|
|
@ -5,6 +5,7 @@ use rustc_expand::base::{ExtCtxt, Resolver};
|
|||
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::{Span, DUMMY_SP};
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
@ -14,7 +15,6 @@ use syntax::entry::{self, EntryPointType};
|
|||
use syntax::mut_visit::{ExpectOne, *};
|
||||
use syntax::ptr::P;
|
||||
use syntax::sess::ParseSess;
|
||||
use syntax::source_map::respan;
|
||||
use syntax::symbol::{sym, Symbol};
|
||||
|
||||
use std::{iter, mem};
|
||||
|
|
|
@ -27,12 +27,12 @@ use rustc_data_structures::small_c_str::SmallCStr;
|
|||
use rustc_target::spec::{HasTargetSpec, Target};
|
||||
|
||||
use crate::abi::Abi;
|
||||
use rustc_span::source_map::{Span, DUMMY_SP};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::ffi::CStr;
|
||||
use std::iter;
|
||||
use std::str;
|
||||
use std::sync::Arc;
|
||||
use syntax::source_map::{Span, DUMMY_SP};
|
||||
use syntax::symbol::Symbol;
|
||||
|
||||
/// There is one `CodegenCx` per compilation unit. Each one has its own LLVM
|
||||
|
|
|
@ -1,27 +1,26 @@
|
|||
use super::operand::OperandRef;
|
||||
use super::operand::OperandValue::{Immediate, Pair, Ref};
|
||||
use super::place::PlaceRef;
|
||||
use super::{FunctionCx, LocalRef};
|
||||
|
||||
use crate::base;
|
||||
use crate::common::{self, IntPredicate};
|
||||
use crate::meth;
|
||||
use crate::traits::*;
|
||||
use crate::MemFlags;
|
||||
|
||||
use rustc::middle::lang_items;
|
||||
use rustc::mir::interpret::PanicInfo;
|
||||
use rustc::mir::{self, PlaceBase, Static, StaticKind};
|
||||
use rustc::ty::layout::{self, FnAbiExt, HasTyCtxt, LayoutOf};
|
||||
use rustc::ty::{self, Instance, Ty, TypeFoldable};
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_span::{source_map::Span, symbol::Symbol};
|
||||
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
use crate::traits::*;
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
use syntax::{source_map::Span, symbol::Symbol};
|
||||
|
||||
use super::operand::OperandRef;
|
||||
use super::operand::OperandValue::{Immediate, Pair, Ref};
|
||||
use super::place::PlaceRef;
|
||||
use super::{FunctionCx, LocalRef};
|
||||
|
||||
/// Used by `FunctionCx::codegen_terminator` for emitting common patterns
|
||||
/// e.g., creating a basic block, calling a function, etc.
|
||||
struct TerminatorCodegenHelper<'tcx> {
|
||||
|
|
|
@ -5,7 +5,7 @@ use rustc::mir::interpret::ErrorHandled;
|
|||
use rustc::ty::layout::{self, HasTyCtxt};
|
||||
use rustc::ty::{self, Ty};
|
||||
use rustc_index::vec::Idx;
|
||||
use syntax::source_map::Span;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
use super::FunctionCx;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ use rustc::ty::cast::{CastTy, IntTy};
|
|||
use rustc::ty::layout::{self, HasTyCtxt, LayoutOf};
|
||||
use rustc::ty::{self, adjustment::PointerCast, Instance, Ty, TyCtxt};
|
||||
use rustc_apfloat::{ieee, Float, Round, Status};
|
||||
use syntax::source_map::{Span, DUMMY_SP};
|
||||
use rustc_span::source_map::{Span, DUMMY_SP};
|
||||
use syntax::symbol::sym;
|
||||
|
||||
use std::{i128, u128};
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
use crate::expand::{self, AstFragment, Invocation};
|
||||
|
||||
use rustc_parse::{self, parser, DirectoryOwnership, MACRO_ARGUMENTS};
|
||||
use rustc_span::source_map::SourceMap;
|
||||
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::source_map::SourceMap;
|
||||
use syntax::symbol::{kw, sym, Ident, Symbol};
|
||||
use syntax::token;
|
||||
use syntax::tokenstream::{self, TokenStream};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::base::ExtCtxt;
|
||||
|
||||
use rustc_span::source_map::{respan, Spanned};
|
||||
use syntax::ast::{self, AttrVec, BlockCheckMode, Expr, Ident, PatKind, UnOp};
|
||||
use syntax::attr;
|
||||
use syntax::ptr::P;
|
||||
use syntax::source_map::{respan, Spanned};
|
||||
use syntax::symbol::{kw, sym, Symbol};
|
||||
|
||||
use rustc_span::{Pos, Span};
|
||||
|
|
|
@ -10,6 +10,8 @@ use rustc_parse::configure;
|
|||
use rustc_parse::parser::Parser;
|
||||
use rustc_parse::validate_attr;
|
||||
use rustc_parse::DirectoryOwnership;
|
||||
use rustc_span::source_map::respan;
|
||||
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};
|
||||
use syntax::attr::{self, is_builtin_attr, HasAttrs};
|
||||
|
@ -18,7 +20,6 @@ use syntax::mut_visit::*;
|
|||
use syntax::print::pprust;
|
||||
use syntax::ptr::P;
|
||||
use syntax::sess::ParseSess;
|
||||
use syntax::source_map::respan;
|
||||
use syntax::symbol::{sym, Symbol};
|
||||
use syntax::token;
|
||||
use syntax::tokenstream::{TokenStream, TokenTree};
|
||||
|
@ -26,7 +27,6 @@ use syntax::util::map_in_place::MapInPlace;
|
|||
use syntax::visit::{self, Visitor};
|
||||
|
||||
use errors::{Applicability, FatalError, PResult};
|
||||
use rustc_span::{FileName, Span, DUMMY_SP};
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_parse::lexer::StringReader;
|
||||
use rustc_span::source_map::{FilePathMapping, SourceMap};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{BytePos, Span};
|
||||
use syntax::sess::ParseSess;
|
||||
use syntax::source_map::{FilePathMapping, SourceMap};
|
||||
use syntax::token::{self, Token, TokenKind};
|
||||
use syntax::util::comments::is_doc_comment;
|
||||
use syntax::with_default_globals;
|
||||
|
|
|
@ -2,12 +2,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::{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::source_map::FilePathMapping;
|
||||
use syntax::symbol::{kw, sym, Symbol};
|
||||
use syntax::token::{self, Token};
|
||||
use syntax::tokenstream::{DelimSpan, TokenStream, TokenTree};
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use crate::base::ExtCtxt;
|
||||
use crate::expand::{AstFragment, AstFragmentKind};
|
||||
|
||||
use rustc_span::source_map::{dummy_spanned, DUMMY_SP};
|
||||
use syntax::ast;
|
||||
use syntax::mut_visit::*;
|
||||
use syntax::ptr::P;
|
||||
use syntax::source_map::{dummy_spanned, DUMMY_SP};
|
||||
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use rustc_parse::{new_parser_from_source_str, parser::Parser, source_file_to_stream};
|
||||
use rustc_span::source_map::{FilePathMapping, SourceMap};
|
||||
use rustc_span::{BytePos, MultiSpan, Span};
|
||||
use syntax::ast;
|
||||
use syntax::sess::ParseSess;
|
||||
use syntax::source_map::{FilePathMapping, SourceMap};
|
||||
use syntax::tokenstream::TokenStream;
|
||||
use syntax::with_default_globals;
|
||||
|
||||
|
|
|
@ -14,12 +14,12 @@ use rustc_data_structures::OnDrop;
|
|||
use rustc_errors::registry::Registry;
|
||||
use rustc_parse::new_parser_from_source_str;
|
||||
use rustc_span::edition;
|
||||
use rustc_span::source_map::{FileLoader, FileName, SourceMap};
|
||||
use std::path::PathBuf;
|
||||
use std::result;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use syntax::ast::{self, MetaItemKind};
|
||||
use syntax::sess::ParseSess;
|
||||
use syntax::source_map::{FileLoader, FileName, SourceMap};
|
||||
use syntax::token;
|
||||
|
||||
pub type Result<T> = result::Result<T, ErrorReported>;
|
||||
|
|
|
@ -15,6 +15,7 @@ use rustc_errors::registry::Registry;
|
|||
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 smallvec::SmallVec;
|
||||
use std::env;
|
||||
use std::io::{self, Write};
|
||||
|
@ -27,7 +28,6 @@ use std::{panic, thread};
|
|||
use syntax::ast::{AttrVec, BlockCheckMode};
|
||||
use syntax::mut_visit::{visit_clobber, MutVisitor, *};
|
||||
use syntax::ptr::P;
|
||||
use syntax::source_map::{FileLoader, RealFileLoader, SourceMap};
|
||||
use syntax::symbol::{sym, Symbol};
|
||||
use syntax::util::lev_distance::find_best_match_for_name;
|
||||
use syntax::{self, ast, attr};
|
||||
|
|
|
@ -37,6 +37,7 @@ use rustc::util::nodemap::FxHashSet;
|
|||
use rustc_feature::Stability;
|
||||
use rustc_feature::{deprecated_attributes, AttributeGate, AttributeTemplate, AttributeType};
|
||||
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{BytePos, Span};
|
||||
use syntax::ast::{self, Expr};
|
||||
use syntax::attr::{self, HasAttrs};
|
||||
|
@ -44,7 +45,6 @@ use syntax::edition::Edition;
|
|||
use syntax::errors::{Applicability, DiagnosticBuilder};
|
||||
use syntax::print::pprust::{self, expr_to_string};
|
||||
use syntax::ptr::P;
|
||||
use syntax::source_map::Spanned;
|
||||
use syntax::symbol::{kw, sym, Symbol};
|
||||
use syntax::tokenstream::{TokenStream, TokenTree};
|
||||
use syntax::visit::FnKind;
|
||||
|
|
|
@ -3,28 +3,24 @@
|
|||
use crate::hir::def_id::DefId;
|
||||
use lint::{LateContext, LintArray, LintContext};
|
||||
use lint::{LateLintPass, LintPass};
|
||||
use rustc::hir;
|
||||
use rustc::hir::{is_range_literal, ExprKind, Node};
|
||||
use rustc::mir::interpret::{sign_extend, truncate};
|
||||
use rustc::ty::layout::{self, IntegerExt, LayoutOf, SizeSkeleton, VariantIdx};
|
||||
use rustc::ty::subst::SubstsRef;
|
||||
use rustc::ty::{self, AdtKind, ParamEnv, Ty, TyCtxt};
|
||||
use rustc::{lint, util};
|
||||
use rustc::{lint, util::nodemap::FxHashSet};
|
||||
use rustc_index::vec::Idx;
|
||||
use util::nodemap::FxHashSet;
|
||||
|
||||
use std::cmp;
|
||||
use std::{f32, f64, i16, i32, i64, i8, u16, u32, u64, u8};
|
||||
|
||||
use rustc_span::source_map;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::errors::Applicability;
|
||||
use syntax::{ast, attr, source_map};
|
||||
|
||||
use rustc::hir;
|
||||
|
||||
use rustc::mir::interpret::{sign_extend, truncate};
|
||||
use syntax::{ast, attr};
|
||||
|
||||
use log::debug;
|
||||
use std::cmp;
|
||||
use std::{f32, f64, i16, i32, i64, i8, u16, u32, u64, u8};
|
||||
|
||||
declare_lint! {
|
||||
UNUSED_COMPARISONS,
|
||||
|
|
|
@ -4,10 +4,10 @@ use rustc::middle::cstore::{self, NativeLibrary};
|
|||
use rustc::session::Session;
|
||||
use rustc::ty::TyCtxt;
|
||||
use rustc::util::nodemap::FxHashSet;
|
||||
use rustc_span::source_map::Span;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::attr;
|
||||
use syntax::feature_gate::feature_err;
|
||||
use syntax::source_map::Span;
|
||||
use syntax::symbol::{kw, sym, Symbol};
|
||||
use syntax::{span_err, struct_span_err};
|
||||
|
||||
|
|
|
@ -36,11 +36,11 @@ use proc_macro::bridge::client::ProcMacro;
|
|||
use rustc_expand::base::{SyntaxExtension, SyntaxExtensionKind};
|
||||
use rustc_expand::proc_macro::{AttrProcMacro, BangProcMacro, ProcMacroDerive};
|
||||
use rustc_serialize::{opaque, Decodable, Decoder, SpecializedDecoder};
|
||||
use rustc_span::source_map::{self, respan, Spanned};
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::{self, hygiene::MacroKind, BytePos, Pos, Span, DUMMY_SP};
|
||||
use syntax::ast::{self, Ident};
|
||||
use syntax::attr;
|
||||
use syntax::source_map::{self, respan, Spanned};
|
||||
|
||||
pub use cstore_impl::{provide, provide_extern};
|
||||
|
||||
|
|
|
@ -26,13 +26,13 @@ use smallvec::SmallVec;
|
|||
use std::any::Any;
|
||||
use std::sync::Arc;
|
||||
|
||||
use rustc_span::source_map;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{FileName, Span};
|
||||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
use syntax::expand::allocator::AllocatorKind;
|
||||
use syntax::ptr::P;
|
||||
use syntax::source_map;
|
||||
use syntax::source_map::Spanned;
|
||||
use syntax::symbol::Symbol;
|
||||
use syntax::tokenstream::DelimSpan;
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ use rustc_data_structures::sync::Lrc;
|
|||
use rustc_serialize::{opaque, Encodable, Encoder, SpecializedEncoder};
|
||||
|
||||
use log::{debug, trace};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{self, FileName, SourceFile, Span};
|
||||
use std::hash::Hash;
|
||||
use std::num::NonZeroUsize;
|
||||
|
@ -33,7 +34,6 @@ use std::u32;
|
|||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
use syntax::expand::is_proc_macro_attr;
|
||||
use syntax::source_map::Spanned;
|
||||
use syntax::symbol::{kw, sym, Ident, Symbol};
|
||||
|
||||
use rustc::hir::intravisit;
|
||||
|
|
|
@ -11,8 +11,8 @@ use rustc::ty::{self, Ty};
|
|||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder};
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_span::source_map::DesugaringKind;
|
||||
use rustc_span::Span;
|
||||
use syntax::source_map::DesugaringKind;
|
||||
|
||||
use crate::dataflow::drop_flag_effects;
|
||||
use crate::dataflow::indexes::{MoveOutIndex, MovePathIndex};
|
||||
|
|
|
@ -3,8 +3,8 @@ use crate::borrow_check::{nll::ToRegionVid, region_infer::RegionInferenceContext
|
|||
use rustc::mir::{Body, Local};
|
||||
use rustc::ty::{RegionVid, TyCtxt};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use rustc_span::source_map::Span;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use syntax::source_map::Span;
|
||||
|
||||
impl<'tcx> RegionInferenceContext<'tcx> {
|
||||
crate fn get_var_name_and_span_for_region(
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
use rustc::mir;
|
||||
use rustc::ty::layout::VariantIdx;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
|
||||
use syntax::{source_map::DUMMY_SP, symbol::Symbol};
|
||||
use rustc_span::{source_map::DUMMY_SP, symbol::Symbol};
|
||||
|
||||
use crate::interpret::{intern_const_alloc_recursive, ConstValue, InterpCx};
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ use rustc::mir;
|
|||
use rustc::mir::interpret::{ConstEvalErr, ErrorHandled};
|
||||
use rustc::traits::Reveal;
|
||||
use rustc::ty::{self, layout, layout::LayoutOf, subst::Subst, TyCtxt};
|
||||
use rustc_span::source_map::Span;
|
||||
use std::convert::TryInto;
|
||||
use syntax::source_map::Span;
|
||||
|
||||
pub fn note_on_undefined_behavior_error() -> &'static str {
|
||||
"The rules on what exactly is undefined behavior aren't clear, \
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::hash::Hash;
|
|||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
|
||||
use syntax::source_map::Span;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
use crate::interpret::{
|
||||
self, snapshot, AllocId, Allocation, AssertMessage, GlobalId, ImmTy, InterpCx, InterpResult,
|
||||
|
|
|
@ -17,7 +17,7 @@ use rustc_data_structures::fx::FxHashMap;
|
|||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_macros::HashStable;
|
||||
use syntax::source_map::{self, Span, DUMMY_SP};
|
||||
use rustc_span::source_map::{self, Span, DUMMY_SP};
|
||||
|
||||
use super::{
|
||||
Immediate, MPlaceTy, Machine, MemPlace, Memory, OpTy, Operand, Place, PlaceTy,
|
||||
|
|
|
@ -19,8 +19,8 @@ use rustc_data_structures::fx::FxHashSet;
|
|||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_span::source_map::Span;
|
||||
use syntax::ast::Mutability;
|
||||
use syntax::source_map::Span;
|
||||
|
||||
use super::eval_context::{LocalState, StackPopCleanup};
|
||||
use super::{Frame, Immediate, LocalValue, MemPlace, Memory, Operand, Place, ScalarMaybeUndef};
|
||||
|
|
|
@ -3,8 +3,8 @@ use std::borrow::Cow;
|
|||
use rustc::ty::layout::{self, LayoutOf, TyLayout};
|
||||
use rustc::ty::Instance;
|
||||
use rustc::{mir, ty};
|
||||
use rustc_span::source_map::Span;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::source_map::Span;
|
||||
|
||||
use super::{
|
||||
FnVal, ImmTy, InterpCx, InterpResult, MPlaceTy, Machine, OpTy, PlaceTy, StackPopCleanup,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::Parser;
|
||||
|
||||
use rustc_errors::PResult;
|
||||
use rustc_span::source_map::DUMMY_SP;
|
||||
use rustc_span::symbol::{kw, sym};
|
||||
use syntax::ast::{self, Attribute, GenericBounds, GenericParam, GenericParamKind, WhereClause};
|
||||
use syntax::source_map::DUMMY_SP;
|
||||
use syntax::token;
|
||||
|
||||
impl<'a> Parser<'a> {
|
||||
|
|
|
@ -11,13 +11,13 @@ use rustc::lint;
|
|||
use rustc::session::Session;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_parse::validate_attr;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::Span;
|
||||
use std::mem;
|
||||
use syntax::ast::*;
|
||||
use syntax::attr;
|
||||
use syntax::expand::is_proc_macro_attr;
|
||||
use syntax::print::pprust;
|
||||
use syntax::source_map::Spanned;
|
||||
use syntax::symbol::{kw, sym};
|
||||
use syntax::visit::{self, Visitor};
|
||||
use syntax::{span_err, struct_span_err, walk_list};
|
||||
|
|
|
@ -17,8 +17,8 @@ use rustc::ty::TyCtxt;
|
|||
use rustc::util::nodemap::FxHashSet;
|
||||
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_span::source_map;
|
||||
use rustc_span::Span;
|
||||
use syntax::source_map;
|
||||
|
||||
use std::mem;
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@ use errors::Applicability;
|
|||
use rustc_expand::base::SyntaxExtension;
|
||||
use rustc_expand::expand::AstFragment;
|
||||
use rustc_span::hygiene::{ExpnId, MacroKind};
|
||||
use rustc_span::source_map::{respan, Spanned};
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use syntax::ast::{self, Block, ForeignItem, ForeignItemKind, Item, ItemKind, NodeId};
|
||||
use syntax::ast::{AssocItem, AssocItemKind, MetaItemKind, StmtKind};
|
||||
use syntax::ast::{Ident, Name};
|
||||
use syntax::attr;
|
||||
use syntax::source_map::{respan, Spanned};
|
||||
use syntax::span_err;
|
||||
use syntax::symbol::{kw, sym};
|
||||
use syntax::token::{self, Token};
|
||||
|
|
|
@ -11,10 +11,10 @@ use rustc::ty::{self, DefIdTree};
|
|||
use rustc::util::nodemap::FxHashSet;
|
||||
use rustc_feature::BUILTIN_ATTRIBUTES;
|
||||
use rustc_span::hygiene::MacroKind;
|
||||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::{BytePos, MultiSpan, Span};
|
||||
use syntax::ast::{self, Ident, Path};
|
||||
use syntax::print::pprust;
|
||||
use syntax::source_map::SourceMap;
|
||||
use syntax::struct_span_err;
|
||||
use syntax::symbol::{kw, Symbol};
|
||||
use syntax::util::lev_distance::find_best_match_for_name;
|
||||
|
|
|
@ -39,13 +39,13 @@ use rustc_metadata::creader::{CStore, CrateLoader};
|
|||
use errors::{Applicability, DiagnosticBuilder};
|
||||
use rustc_expand::base::SyntaxExtension;
|
||||
use rustc_span::hygiene::{ExpnId, ExpnKind, MacroKind, SyntaxContext, Transparency};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use syntax::ast::{self, FloatTy, Ident, IntTy, Name, NodeId, UintTy};
|
||||
use syntax::ast::{Crate, CRATE_NODE_ID};
|
||||
use syntax::ast::{ItemKind, Path};
|
||||
use syntax::attr;
|
||||
use syntax::print::pprust;
|
||||
use syntax::source_map::Spanned;
|
||||
use syntax::symbol::{kw, sym};
|
||||
use syntax::visit::{self, Visitor};
|
||||
use syntax::{struct_span_err, unwrap_or};
|
||||
|
|
|
@ -23,11 +23,11 @@ use rustc_data_structures::fx::FxHashSet;
|
|||
use std::env;
|
||||
use std::path::Path;
|
||||
|
||||
use rustc_span::source_map::{respan, DUMMY_SP};
|
||||
use rustc_span::*;
|
||||
use syntax::ast::{self, Attribute, NodeId, PatKind};
|
||||
use syntax::print::pprust::{bounds_to_string, generic_params_to_string, ty_to_string};
|
||||
use syntax::ptr::P;
|
||||
use syntax::source_map::{respan, DUMMY_SP};
|
||||
use syntax::token;
|
||||
use syntax::visit::{self, Visitor};
|
||||
use syntax::walk_list;
|
||||
|
|
|
@ -26,11 +26,11 @@ use std::fs::File;
|
|||
use std::io::BufWriter;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::*;
|
||||
use syntax::ast::{self, Attribute, NodeId, PatKind, DUMMY_NODE_ID};
|
||||
use syntax::print::pprust;
|
||||
use syntax::print::pprust::{param_to_string, ty_to_string};
|
||||
use syntax::source_map::Spanned;
|
||||
use syntax::util::comments::strip_doc_comment_decoration;
|
||||
use syntax::visit::{self, Visitor};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use rustc::ty::query::Providers;
|
|||
use rustc::ty::subst::{InternalSubsts, Subst};
|
||||
use rustc::ty::{self, ParamEnvAnd, Ty, TyCtxt};
|
||||
use rustc::util::nodemap::FxHashSet;
|
||||
use syntax::source_map::{Span, DUMMY_SP};
|
||||
use rustc_span::source_map::{Span, DUMMY_SP};
|
||||
|
||||
crate fn provide(p: &mut Providers<'_>) {
|
||||
*p = Providers { dropck_outlives, adt_dtorck_constraint, ..*p };
|
||||
|
|
|
@ -4,7 +4,7 @@ use rustc::traits::{
|
|||
};
|
||||
use rustc::ty::query::Providers;
|
||||
use rustc::ty::{ParamEnvAnd, TyCtxt};
|
||||
use syntax::source_map::DUMMY_SP;
|
||||
use rustc_span::source_map::DUMMY_SP;
|
||||
|
||||
crate fn provide(p: &mut Providers<'_>) {
|
||||
*p = Providers { evaluate_obligation, ..*p };
|
||||
|
|
|
@ -12,8 +12,8 @@ use rustc::ty::outlives::Component;
|
|||
use rustc::ty::query::Providers;
|
||||
use rustc::ty::wf;
|
||||
use rustc::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc_span::source_map::DUMMY_SP;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use syntax::source_map::DUMMY_SP;
|
||||
|
||||
crate fn provide(p: &mut Providers<'_>) {
|
||||
*p = Providers { implied_outlives_bounds, ..*p };
|
||||
|
|
|
@ -14,10 +14,10 @@ use rustc::traits::Obligation;
|
|||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::subst::InternalSubsts;
|
||||
use rustc::ty::{self, GenericParamDefKind, Ty};
|
||||
use rustc_span::source_map::Span;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use std::cmp;
|
||||
use std::iter;
|
||||
use syntax::source_map::Span;
|
||||
|
||||
/// What signature do we *expect* the closure to have from context?
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -32,8 +32,8 @@ use rustc::ty::Ty;
|
|||
use rustc::ty::TypeFoldable;
|
||||
use rustc::ty::{AdtKind, Visibility};
|
||||
use rustc_span::hygiene::DesugaringKind;
|
||||
use rustc_span::source_map::Span;
|
||||
use syntax::ast;
|
||||
use syntax::source_map::Span;
|
||||
use syntax::symbol::{kw, sym, Symbol};
|
||||
use syntax::util::lev_distance::find_best_match_for_name;
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ use rustc::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
|
|||
use rustc::traits::Obligation;
|
||||
use rustc::ty::print::with_crate_prefix;
|
||||
use rustc::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc_span::{FileName, Span};
|
||||
use rustc_span::{source_map, FileName, Span};
|
||||
use syntax::ast;
|
||||
use syntax::util::lev_distance;
|
||||
use syntax::{ast, source_map};
|
||||
|
||||
use rustc_error_codes::*;
|
||||
|
||||
|
|
|
@ -119,12 +119,12 @@ use rustc::ty::{
|
|||
};
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_span::hygiene::DesugaringKind;
|
||||
use rustc_span::source_map::{original_sp, DUMMY_SP};
|
||||
use rustc_span::{self, BytePos, MultiSpan, Span};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
use syntax::feature_gate::feature_err;
|
||||
use syntax::source_map::{original_sp, DUMMY_SP};
|
||||
use syntax::symbol::{kw, sym, Ident};
|
||||
use syntax::util::parser::ExprPrecedence;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc::ty::fold::{TypeFoldable, TypeVisitor};
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
use rustc::util::nodemap::FxHashSet;
|
||||
use syntax::source_map::Span;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||
pub struct Parameter(pub u32);
|
||||
|
|
|
@ -17,12 +17,12 @@ use rustc::ty::layout::VariantIdx;
|
|||
use rustc::util::nodemap::{FxHashMap, FxHashSet};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_span::hygiene::MacroKind;
|
||||
use rustc_span::source_map::DUMMY_SP;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::{self, FileName};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::ast::{self, AttrStyle, Ident};
|
||||
use syntax::attr;
|
||||
use syntax::source_map::DUMMY_SP;
|
||||
use syntax::util::comments::strip_doc_comment_decoration;
|
||||
|
||||
use crate::clean::cfg::Cfg;
|
||||
|
|
|
@ -17,10 +17,10 @@ use rustc_resolve as resolve;
|
|||
|
||||
use errors::emitter::{Emitter, EmitterWriter};
|
||||
use errors::json::JsonEmitter;
|
||||
use rustc_span::source_map;
|
||||
use rustc_span::DUMMY_SP;
|
||||
use syntax::ast::CRATE_NODE_ID;
|
||||
use syntax::attr;
|
||||
use syntax::source_map;
|
||||
use syntax::symbol::sym;
|
||||
|
||||
use rustc_data_structures::sync::{self, Lrc};
|
||||
|
|
|
@ -12,9 +12,9 @@ use std::io;
|
|||
use std::io::prelude::*;
|
||||
|
||||
use rustc_parse::lexer;
|
||||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::{FileName, Span};
|
||||
use syntax::sess::ParseSess;
|
||||
use syntax::source_map::SourceMap;
|
||||
use syntax::symbol::{kw, sym};
|
||||
use syntax::token::{self, Token};
|
||||
|
||||
|
|
|
@ -51,12 +51,12 @@ use rustc::util::nodemap::{FxHashMap, FxHashSet};
|
|||
use rustc_data_structures::flock;
|
||||
use rustc_feature::UnstableFeatures;
|
||||
use rustc_span::hygiene::MacroKind;
|
||||
use rustc_span::source_map::FileName;
|
||||
use serde::ser::SerializeSeq;
|
||||
use serde::{Serialize, Serializer};
|
||||
use syntax::ast;
|
||||
use syntax::edition::Edition;
|
||||
use syntax::print::pprust;
|
||||
use syntax::source_map::FileName;
|
||||
use syntax::symbol::{sym, Symbol};
|
||||
|
||||
use crate::clean::{self, AttributesExt, Deprecation, GetDefId, SelfTy};
|
||||
|
|
|
@ -3,10 +3,10 @@ use crate::fold::DocFolder;
|
|||
use rustc::hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX};
|
||||
use rustc::middle::privacy::AccessLevels;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_span::source_map::FileName;
|
||||
use std::collections::BTreeMap;
|
||||
use std::mem;
|
||||
use std::path::{Path, PathBuf};
|
||||
use syntax::source_map::FileName;
|
||||
use syntax::symbol::sym;
|
||||
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -5,10 +5,10 @@ use crate::html::format::Buffer;
|
|||
use crate::html::highlight;
|
||||
use crate::html::layout;
|
||||
use crate::html::render::{Error, SharedContext, BASIC_KEYWORDS};
|
||||
use rustc_span::source_map::FileName;
|
||||
use std::ffi::OsStr;
|
||||
use std::fs;
|
||||
use std::path::{Component, Path, PathBuf};
|
||||
use syntax::source_map::FileName;
|
||||
|
||||
crate fn render(
|
||||
dst: &Path,
|
||||
|
|
|
@ -4,8 +4,8 @@ use std::path::PathBuf;
|
|||
|
||||
use errors;
|
||||
use rustc_feature::UnstableFeatures;
|
||||
use rustc_span::source_map::DUMMY_SP;
|
||||
use syntax::edition::Edition;
|
||||
use syntax::source_map::DUMMY_SP;
|
||||
use testing;
|
||||
|
||||
use crate::config::{Options, RenderOptions};
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use errors::Applicability;
|
||||
use rustc_parse::lexer::StringReader as Lexer;
|
||||
use rustc_span::source_map::FilePathMapping;
|
||||
use rustc_span::{FileName, InnerSpan};
|
||||
use syntax::sess::ParseSess;
|
||||
use syntax::source_map::FilePathMapping;
|
||||
use syntax::token;
|
||||
|
||||
use crate::clean;
|
||||
|
|
|
@ -5,6 +5,7 @@ use rustc::util::common::ErrorReported;
|
|||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_feature::UnstableFeatures;
|
||||
use rustc_interface::interface;
|
||||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::{BytePos, FileName, Pos, Span, DUMMY_SP};
|
||||
use rustc_target::spec::TargetTriple;
|
||||
use std::env;
|
||||
|
@ -15,7 +16,6 @@ use std::process::{self, Command, Stdio};
|
|||
use std::str;
|
||||
use syntax::ast;
|
||||
use syntax::edition::Edition;
|
||||
use syntax::source_map::SourceMap;
|
||||
use syntax::symbol::sym;
|
||||
use syntax::with_globals;
|
||||
use tempfile::Builder as TempFileBuilder;
|
||||
|
@ -402,10 +402,11 @@ pub fn make_test(
|
|||
// Uses libsyntax to parse the doctest and find if there's a main fn and the extern
|
||||
// crate already is included.
|
||||
let (already_has_main, already_has_extern_crate, found_macro) = with_globals(edition, || {
|
||||
use crate::syntax::{sess::ParseSess, source_map::FilePathMapping};
|
||||
use errors::emitter::EmitterWriter;
|
||||
use errors::Handler;
|
||||
use rustc_parse::maybe_new_parser_from_source_str;
|
||||
use rustc_span::source_map::FilePathMapping;
|
||||
use syntax::sess::ParseSess;
|
||||
|
||||
let filename = FileName::anon_source_code(s);
|
||||
let source = crates + &everything_else;
|
||||
|
|
|
@ -8,9 +8,9 @@ use rustc::middle::privacy::AccessLevel;
|
|||
use rustc::ty::TyCtxt;
|
||||
use rustc::util::nodemap::{FxHashMap, FxHashSet};
|
||||
use rustc_span::hygiene::MacroKind;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{self, Span};
|
||||
use syntax::ast;
|
||||
use syntax::source_map::Spanned;
|
||||
use syntax::symbol::sym;
|
||||
|
||||
use std::mem;
|
||||
|
|
|
@ -25,19 +25,18 @@ pub use UnsafeSource::*;
|
|||
pub use rustc_span::symbol::{Ident, Symbol as Name};
|
||||
|
||||
use crate::ptr::P;
|
||||
use crate::source_map::{dummy_spanned, respan, Spanned};
|
||||
use crate::token::{self, DelimToken};
|
||||
use crate::tokenstream::{DelimSpan, TokenStream, TokenTree};
|
||||
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_data_structures::thin_vec::ThinVec;
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_macros::HashStable_Generic;
|
||||
use rustc_serialize::{self, Decoder, Encoder};
|
||||
use rustc_span::source_map::{dummy_spanned, respan, Spanned};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
|
||||
use std::fmt;
|
||||
use std::iter;
|
||||
|
|
|
@ -14,13 +14,13 @@ use crate::ast::{Expr, GenericParam, Item, Lit, LitKind, Local, Stmt, StmtKind};
|
|||
use crate::ast::{MacArgs, MacDelimiter, MetaItem, MetaItemKind, NestedMetaItem};
|
||||
use crate::mut_visit::visit_clobber;
|
||||
use crate::ptr::P;
|
||||
use crate::source_map::{BytePos, Spanned};
|
||||
use crate::symbol::{sym, Symbol};
|
||||
use crate::token::{self, Token};
|
||||
use crate::tokenstream::{DelimSpan, TokenStream, TokenTree, TreeAndJoint};
|
||||
use crate::GLOBALS;
|
||||
|
||||
use log::debug;
|
||||
use rustc_span::source_map::{BytePos, Spanned};
|
||||
use rustc_span::Span;
|
||||
|
||||
use std::iter;
|
||||
|
|
|
@ -1,25 +1,24 @@
|
|||
use crate::ast::{self, AssocTyConstraint, AssocTyConstraintKind, NodeId};
|
||||
use crate::ast::{GenericParam, GenericParamKind, PatKind, RangeEnd, VariantData};
|
||||
use crate::attr;
|
||||
use crate::edition::{Edition, ALL_EDITIONS};
|
||||
use crate::sess::ParseSess;
|
||||
use crate::symbol::{sym, Symbol};
|
||||
use crate::visit::{self, FnKind, Visitor};
|
||||
|
||||
use errors::{Applicability, DiagnosticBuilder, Handler};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_error_codes::*;
|
||||
use rustc_feature::{find_feature_issue, GateIssue};
|
||||
use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP};
|
||||
use rustc_feature::{Feature, Features, State as FeatureState, UnstableFeatures};
|
||||
use rustc_feature::{
|
||||
ACCEPTED_FEATURES, ACTIVE_FEATURES, REMOVED_FEATURES, STABLE_REMOVED_FEATURES,
|
||||
};
|
||||
|
||||
use crate::ast::{self, AssocTyConstraint, AssocTyConstraintKind, NodeId};
|
||||
use crate::ast::{GenericParam, GenericParamKind, PatKind, RangeEnd, VariantData};
|
||||
use crate::attr;
|
||||
use crate::edition::{Edition, ALL_EDITIONS};
|
||||
use crate::sess::ParseSess;
|
||||
use crate::source_map::Spanned;
|
||||
use crate::symbol::{sym, Symbol};
|
||||
use crate::visit::{self, FnKind, Visitor};
|
||||
|
||||
use errors::{Applicability, DiagnosticBuilder, Handler};
|
||||
use log::debug;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{MultiSpan, Span, DUMMY_SP};
|
||||
|
||||
use rustc_error_codes::*;
|
||||
use log::debug;
|
||||
|
||||
macro_rules! gate_feature_fn {
|
||||
($cx: expr, $has_feature: expr, $span: expr, $name: expr, $explain: expr, $level: expr) => {{
|
||||
|
|
|
@ -86,9 +86,8 @@ pub mod util {
|
|||
|
||||
pub mod ast;
|
||||
pub mod attr;
|
||||
pub mod expand;
|
||||
pub use rustc_span::source_map;
|
||||
pub mod entry;
|
||||
pub mod expand;
|
||||
pub mod feature_gate {
|
||||
mod check;
|
||||
pub use check::{check_attribute, check_crate, feature_err, feature_err_issue, get_features};
|
||||
|
|
|
@ -9,15 +9,15 @@
|
|||
|
||||
use crate::ast::*;
|
||||
use crate::ptr::P;
|
||||
use crate::source_map::{respan, Spanned};
|
||||
use crate::token::{self, Token};
|
||||
use crate::tokenstream::*;
|
||||
use crate::util::map_in_place::MapInPlace;
|
||||
|
||||
use rustc_span::Span;
|
||||
use smallvec::{smallvec, Array, SmallVec};
|
||||
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_span::source_map::{respan, Spanned};
|
||||
use rustc_span::Span;
|
||||
|
||||
use smallvec::{smallvec, Array, SmallVec};
|
||||
use std::ops::DerefMut;
|
||||
use std::{panic, process, ptr};
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::print::pp::Breaks::{Consistent, Inconsistent};
|
|||
use crate::print::pp::{self, Breaks};
|
||||
use crate::ptr::P;
|
||||
use crate::sess::ParseSess;
|
||||
use crate::source_map::{self, SourceMap, Spanned};
|
||||
use crate::symbol::{kw, sym};
|
||||
use crate::token::{self, BinOpToken, DelimToken, Nonterminal, Token, TokenKind};
|
||||
use crate::tokenstream::{self, TokenStream, TokenTree};
|
||||
|
@ -14,8 +13,8 @@ use crate::util::classify;
|
|||
use crate::util::comments;
|
||||
use crate::util::parser::{self, AssocOp, Fixity};
|
||||
|
||||
use rustc_span::{self, BytePos};
|
||||
use rustc_span::{FileName, Span};
|
||||
use rustc_span::source_map::{dummy_spanned, SourceMap, Spanned};
|
||||
use rustc_span::{BytePos, FileName, Span};
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
@ -2709,7 +2708,7 @@ impl<'a> State<'a> {
|
|||
ast::FnHeader { unsafety, ext, ..ast::FnHeader::default() },
|
||||
name,
|
||||
&generics,
|
||||
&source_map::dummy_spanned(ast::VisibilityKind::Inherited),
|
||||
&dummy_spanned(ast::VisibilityKind::Inherited),
|
||||
);
|
||||
self.end();
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::*;
|
||||
|
||||
use crate::ast;
|
||||
use crate::source_map;
|
||||
use crate::with_default_globals;
|
||||
use rustc_span;
|
||||
use rustc_span::source_map::{dummy_spanned, respan};
|
||||
|
||||
fn fun_to_string(
|
||||
decl: &ast::FnDecl,
|
||||
|
@ -18,7 +18,7 @@ fn fun_to_string(
|
|||
header,
|
||||
Some(name),
|
||||
generics,
|
||||
&source_map::dummy_spanned(ast::VisibilityKind::Inherited),
|
||||
&dummy_spanned(ast::VisibilityKind::Inherited),
|
||||
);
|
||||
s.end(); // Close the head box.
|
||||
s.end(); // Close the outer box.
|
||||
|
@ -53,7 +53,7 @@ fn test_variant_to_string() {
|
|||
|
||||
let var = ast::Variant {
|
||||
ident,
|
||||
vis: source_map::respan(rustc_span::DUMMY_SP, ast::VisibilityKind::Inherited),
|
||||
vis: respan(rustc_span::DUMMY_SP, ast::VisibilityKind::Inherited),
|
||||
attrs: Vec::new(),
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
data: ast::VariantData::Unit(ast::DUMMY_NODE_ID),
|
||||
|
|
|
@ -2,8 +2,8 @@ pub use CommentStyle::*;
|
|||
|
||||
use crate::ast;
|
||||
use crate::sess::ParseSess;
|
||||
use crate::source_map::SourceMap;
|
||||
|
||||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::{BytePos, CharPos, FileName, Pos};
|
||||
|
||||
use std::usize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue