mv (mod) codemap source_map

This commit is contained in:
Donato Sciarra 2018-08-18 12:14:03 +02:00
parent cbd0595710
commit 82607d2cf3
104 changed files with 157 additions and 153 deletions

View File

@ -68,7 +68,7 @@ use syntax::errors;
use syntax::ext::hygiene::{Mark, SyntaxContext};
use syntax::print::pprust;
use syntax::ptr::P;
use syntax::codemap::{self, respan, CompilerDesugaringKind, Spanned};
use syntax::source_map::{self, respan, CompilerDesugaringKind, Spanned};
use syntax::std_inject;
use syntax::symbol::{keywords, Symbol};
use syntax::tokenstream::{Delimited, TokenStream, TokenTree};
@ -614,14 +614,14 @@ impl<'a> LoweringContext<'a> {
fn allow_internal_unstable(&self, reason: CompilerDesugaringKind, span: Span) -> Span {
let mark = Mark::fresh(Mark::root());
mark.set_expn_info(codemap::ExpnInfo {
mark.set_expn_info(source_map::ExpnInfo {
call_site: span,
def_site: Some(span),
format: codemap::CompilerDesugaring(reason),
format: source_map::CompilerDesugaring(reason),
allow_internal_unstable: true,
allow_internal_unsafe: false,
local_inner_macros: false,
edition: codemap::hygiene::default_edition(),
edition: source_map::hygiene::default_edition(),
});
span.with_ctxt(SyntaxContext::empty().apply_mark(mark))
}

View File

@ -18,7 +18,7 @@ use middle::cstore::CrateStore;
use session::CrateDisambiguator;
use std::iter::repeat;
use syntax::ast::{NodeId, CRATE_NODE_ID};
use syntax::codemap::SourceMap;
use syntax::source_map::SourceMap;
use syntax_pos::Span;
use ich::StableHashingContext;

View File

@ -24,7 +24,7 @@ use middle::cstore::CrateStore;
use rustc_target::spec::abi::Abi;
use rustc_data_structures::svh::Svh;
use syntax::ast::{self, Name, NodeId, CRATE_NODE_ID};
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax::ext::base::MacroKind;
use syntax_pos::{Span, DUMMY_SP};

View File

@ -24,7 +24,7 @@ use util::nodemap::{NodeMap, FxHashSet};
use mir::mono::Linkage;
use syntax_pos::{Span, DUMMY_SP, symbol::InternedString};
use syntax::codemap::{self, Spanned};
use syntax::source_map::{self, Spanned};
use rustc_target::spec::abi::Abi;
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, DUMMY_NODE_ID, AsmDialect};
use syntax::ast::{Attribute, Lit, StrStyle, FloatTy, IntTy, UintTy, MetaItem};
@ -1100,7 +1100,7 @@ pub type Stmt = Spanned<StmtKind>;
impl fmt::Debug for StmtKind {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// Sadness.
let spanned = codemap::dummy_spanned(self.clone());
let spanned = source_map::dummy_spanned(self.clone());
write!(f,
"stmt({}: {})",
spanned.node.id(),

View File

@ -12,7 +12,7 @@ pub use self::AnnNode::*;
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::codemap::{SourceMap, Spanned};
use syntax::source_map::{SourceMap, Spanned};
use syntax::parse::ParseSess;
use syntax::parse::lexer::comments;
use syntax::print::pp::{self, Breaks};

View File

@ -9,7 +9,7 @@
// except according to those terms.
use rustc_data_structures::sync::Lrc;
use syntax::codemap::SourceMap;
use syntax::source_map::SourceMap;
use syntax_pos::{BytePos, SourceFile};
#[derive(Clone)]

View File

@ -25,7 +25,7 @@ use std::cell::RefCell;
use syntax::ast;
use syntax::codemap::SourceMap;
use syntax::source_map::SourceMap;
use syntax::ext::hygiene::SyntaxContext;
use syntax::symbol::Symbol;
use syntax_pos::{Span, DUMMY_SP};

View File

@ -37,7 +37,7 @@ use rustc_data_structures::small_vec::SmallVec;
use rustc_data_structures::sync::Lrc;
use serialize::UseSpecializedDecodable;
use std::ops::Index;
use syntax::codemap::Span;
use syntax::source_map::Span;
use ty::fold::TypeFoldable;
use ty::subst::Kind;
use ty::{self, CanonicalVar, Lift, Region, Slice, TyCtxt};

View File

@ -13,7 +13,7 @@ use hir::intravisit::{self, Visitor, NestedVisitorMap};
use infer::InferCtxt;
use infer::type_variable::TypeVariableOrigin;
use ty::{self, Ty, TyInfer, TyVar};
use syntax::codemap::CompilerDesugaringKind;
use syntax::source_map::CompilerDesugaringKind;
use syntax_pos::Span;
use errors::DiagnosticBuilder;

View File

@ -11,7 +11,7 @@
use infer::InferCtxt;
use infer::lexical_region_resolve::RegionResolutionError;
use infer::lexical_region_resolve::RegionResolutionError::*;
use syntax::codemap::Span;
use syntax::source_map::Span;
use ty::{self, TyCtxt};
use util::common::ErrorReported;

View File

@ -18,7 +18,7 @@ use errors::{Applicability, DiagnosticBuilder};
use lint::{LintPass, LateLintPass, LintArray};
use session::Session;
use syntax::ast;
use syntax::codemap::Span;
use syntax::source_map::Span;
declare_lint! {
pub EXCEEDING_BITSHIFTS,

View File

@ -21,7 +21,7 @@ use rustc_data_structures::stable_hasher::{HashStable, ToStableHashKey,
use session::Session;
use syntax::ast;
use syntax::attr;
use syntax::codemap::MultiSpan;
use syntax::source_map::MultiSpan;
use syntax::feature_gate;
use syntax::symbol::Symbol;
use util::nodemap::FxHashMap;

View File

@ -42,7 +42,7 @@ use lint::builtin::parser::QUESTION_MARK_MACRO_SEP;
use session::{Session, DiagnosticMessageId};
use std::{hash, ptr};
use syntax::ast;
use syntax::codemap::{MultiSpan, ExpnFormat};
use syntax::source_map::{MultiSpan, ExpnFormat};
use syntax::early_buffered_lints::BufferedEarlyLintId;
use syntax::edition::Edition;
use syntax::symbol::Symbol;

View File

@ -147,7 +147,7 @@ macro_rules! impl_stable_hash_for {
macro_rules! impl_stable_hash_for_spanned {
($T:path) => (
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for ::syntax::codemap::Spanned<$T>
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for ::syntax::source_map::Spanned<$T>
{
#[inline]
fn hash_stable<W: StableHasherResult>(&self,

View File

@ -24,7 +24,7 @@ use middle::privacy;
use ty::{self, TyCtxt};
use util::nodemap::FxHashSet;
use syntax::{ast, codemap};
use syntax::{ast, source_map};
use syntax::attr;
use syntax_pos;
@ -115,7 +115,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
}
fn handle_field_pattern_match(&mut self, lhs: &hir::Pat, def: Def,
pats: &[codemap::Spanned<hir::FieldPat>]) {
pats: &[source_map::Spanned<hir::FieldPat>]) {
let variant = match self.tables.node_id_to_type(lhs.hir_id).sty {
ty::TyAdt(adt, _) => adt.variant_of_def(def),
_ => span_bug!(lhs.span, "non-ADT in struct pattern")

View File

@ -23,7 +23,7 @@ use ty;
use std::fmt;
use std::mem;
use rustc_data_structures::sync::Lrc;
use syntax::codemap;
use syntax::source_map;
use syntax::ast;
use syntax_pos::{Span, DUMMY_SP};
use ty::TyCtxt;
@ -943,11 +943,15 @@ fn resolve_expr<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>, expr:
// scopes, meaning that temporaries cannot outlive them.
// This ensures fixed size stacks.
hir::ExprKind::Binary(codemap::Spanned { node: hir::BinOpKind::And, .. }, _, ref r) |
hir::ExprKind::Binary(codemap::Spanned { node: hir::BinOpKind::Or, .. }, _, ref r) => {
// For shortcircuiting operators, mark the RHS as a terminating
// scope since it only executes conditionally.
terminating(r.hir_id.local_id);
hir::ExprKind::Binary(
source_map::Spanned { node: hir::BinOpKind::And, .. },
_, ref r) |
hir::ExprKind::Binary(
source_map::Spanned { node: hir::BinOpKind::Or, .. },
_, ref r) => {
// For shortcircuiting operators, mark the RHS as a terminating
// scope since it only executes conditionally.
terminating(r.hir_id.local_id);
}
hir::ExprKind::If(ref expr, ref then, Some(ref otherwise)) => {

View File

@ -22,7 +22,7 @@ use lint;
use middle::cstore;
use syntax::ast::{self, IntTy, UintTy};
use syntax::codemap::{FileName, FilePathMapping};
use syntax::source_map::{FileName, FilePathMapping};
use syntax::edition::{Edition, EDITION_NAME_LIST, DEFAULT_EDITION};
use syntax::parse::token;
use syntax::parse;

View File

@ -35,7 +35,7 @@ use syntax::json::JsonEmitter;
use syntax::feature_gate;
use syntax::parse;
use syntax::parse::ParseSess;
use syntax::{ast, codemap};
use syntax::{ast, source_map};
use syntax::feature_gate::AttributeType;
use syntax_pos::{MultiSpan, Span};
use util::profiling::SelfProfiler;
@ -484,7 +484,7 @@ impl Session {
);
}
pub fn codemap<'a>(&'a self) -> &'a codemap::SourceMap {
pub fn codemap<'a>(&'a self) -> &'a source_map::SourceMap {
self.parse_sess.codemap()
}
pub fn verbose(&self) -> bool {
@ -984,7 +984,7 @@ pub fn build_session(
sopts,
local_crate_source_file,
registry,
Lrc::new(codemap::SourceMap::new(file_path_mapping)),
Lrc::new(source_map::SourceMap::new(file_path_mapping)),
None,
)
}
@ -993,7 +993,7 @@ pub fn build_session_with_codemap(
sopts: config::Options,
local_crate_source_file: Option<PathBuf>,
registry: errors::registry::Registry,
codemap: Lrc<codemap::SourceMap>,
codemap: Lrc<source_map::SourceMap>,
emitter_dest: Option<Box<dyn Write + Send>>,
) -> Session {
// FIXME: This is not general enough to make the warning lint completely override
@ -1070,7 +1070,7 @@ pub fn build_session_(
sopts: config::Options,
local_crate_source_file: Option<PathBuf>,
span_diagnostic: errors::Handler,
codemap: Lrc<codemap::SourceMap>,
codemap: Lrc<source_map::SourceMap>,
) -> Session {
let host_triple = TargetTriple::from_triple(config::host_triple());
let host = match Target::search(&host_triple) {

View File

@ -12,7 +12,7 @@ use infer::at::At;
use infer::InferOk;
use rustc_data_structures::small_vec::SmallVec;
use std::iter::FromIterator;
use syntax::codemap::Span;
use syntax::source_map::Span;
use ty::subst::Kind;
use ty::{self, Ty, TyCtxt};

View File

@ -10,7 +10,7 @@
use infer::InferCtxt;
use syntax::ast;
use syntax::codemap::Span;
use syntax::source_map::Span;
use rustc_data_structures::small_vec::SmallVec;
use traits::{FulfillmentContext, ObligationCause, TraitEngine, TraitEngineExt};
use traits::query::NoSolution;

View File

@ -15,7 +15,7 @@ use traits::query::Fallible;
use infer::canonical::query_result;
use infer::canonical::QueryRegionConstraint;
use std::rc::Rc;
use syntax::codemap::DUMMY_SP;
use syntax::source_map::DUMMY_SP;
use traits::{ObligationCause, TraitEngine, TraitEngineExt};
pub struct CustomTypeOp<F, G> {

View File

@ -73,7 +73,7 @@ use std::sync::Arc;
use rustc_target::spec::abi;
use syntax::ast::{self, NodeId};
use syntax::attr;
use syntax::codemap::MultiSpan;
use syntax::source_map::MultiSpan;
use syntax::edition::Edition;
use syntax::feature_gate;
use syntax::symbol::{Symbol, keywords, InternedString};

View File

@ -26,7 +26,7 @@ use rustc_serialize::{Decodable, Decoder, Encodable, Encoder, opaque,
use session::{CrateDisambiguator, Session};
use std::mem;
use syntax::ast::NodeId;
use syntax::codemap::{SourceMap, StableFilemapId};
use syntax::source_map::{SourceMap, StableFilemapId};
use syntax_pos::{BytePos, Span, DUMMY_SP, SourceFile};
use syntax_pos::hygiene::{Mark, SyntaxContext, ExpnInfo};
use ty;

View File

@ -32,7 +32,7 @@ use std::mem;
use std::ptr;
use std::collections::hash_map::Entry;
use syntax_pos::Span;
use syntax::codemap::DUMMY_SP;
use syntax::source_map::DUMMY_SP;
pub struct QueryCache<'tcx, D: QueryConfig<'tcx> + ?Sized> {
pub(super) results: FxHashMap<D::Key, QueryValue<D::Value>>,

View File

@ -17,7 +17,7 @@ use syntax::{
Mac, Mod, Mutability, Ty, TyKind, Unsafety, VisibilityKind,
},
attr,
codemap::{
source_map::{
respan, ExpnInfo, MacroAttribute,
},
ext::{

View File

@ -25,7 +25,7 @@ use consts;
use type_of::LayoutLlvmExt;
use type_::Type;
use syntax::ast::Mutability;
use syntax::codemap::Span;
use syntax::source_map::Span;
use value::Value;
use super::super::callee;

View File

@ -107,7 +107,7 @@ use std::sync::{Once, ONCE_INIT};
use std::thread;
use syntax::ast;
use syntax::codemap::{SourceMap, FileLoader, RealFileLoader};
use syntax::source_map::{SourceMap, FileLoader, RealFileLoader};
use syntax::feature_gate::{GatedCfg, UnstableFeatures};
use syntax::parse::{self, PResult};
use syntax_pos::{DUMMY_SP, MultiSpan, FileName};

View File

@ -32,7 +32,7 @@ use rustc_data_structures::sync::{self, Lrc};
use syntax;
use syntax::ast;
use rustc_target::spec::abi::Abi;
use syntax::codemap::{SourceMap, FilePathMapping, FileName};
use syntax::source_map::{SourceMap, FilePathMapping, FileName};
use errors;
use errors::emitter::Emitter;
use errors::{Level, DiagnosticBuilder};

View File

@ -45,7 +45,7 @@ use rustc::util::nodemap::FxHashSet;
use syntax::tokenstream::{TokenTree, TokenStream};
use syntax::ast;
use syntax::attr;
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax::edition::Edition;
use syntax::feature_gate::{AttributeGate, AttributeType, Stability, deprecated_attributes};
use syntax_pos::{BytePos, Span, SyntaxContext};

View File

@ -25,7 +25,7 @@ use syntax::{ast, attr};
use syntax::errors::Applicability;
use rustc_target::spec::abi::Abi;
use syntax_pos::Span;
use syntax::codemap;
use syntax::source_map;
use rustc::hir;
@ -208,7 +208,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
}
fn rev_binop(binop: hir::BinOp) -> hir::BinOp {
codemap::respan(binop.span,
source_map::respan(binop.span,
match binop.node {
hir::BinOpKind::Lt => hir::BinOpKind::Gt,
hir::BinOpKind::Le => hir::BinOpKind::Ge,

View File

@ -38,7 +38,7 @@ use std::sync::Arc;
use syntax::ast;
use syntax::attr;
use syntax::codemap;
use syntax::source_map;
use syntax::edition::Edition;
use syntax::parse::source_file_to_stream;
use syntax::symbol::Symbol;
@ -487,7 +487,7 @@ impl cstore::CStore {
tokens: body.into(),
legacy: def.legacy,
}),
vis: codemap::respan(local_span.shrink_to_lo(), ast::VisibilityKind::Inherited),
vis: source_map::respan(local_span.shrink_to_lo(), ast::VisibilityKind::Inherited),
tokens: None,
})
}

View File

@ -39,7 +39,7 @@ use std::u32;
use rustc_serialize::{Decodable, Decoder, SpecializedDecoder, opaque};
use syntax::attr;
use syntax::ast::{self, Ident};
use syntax::codemap;
use syntax::source_map;
use syntax::symbol::InternedString;
use syntax::ext::base::MacroKind;
use syntax_pos::{self, Span, BytePos, Pos, DUMMY_SP, NO_EXPANSION};
@ -1117,7 +1117,7 @@ impl<'a, 'tcx> CrateMetadata {
/// multibyte characters. This information is enough to generate valid debuginfo
/// for items inlined from other crates.
pub fn imported_source_files(&'a self,
local_codemap: &codemap::SourceMap)
local_codemap: &source_map::SourceMap)
-> ReadGuard<'a, Vec<cstore::ImportedSourceFile>> {
{
let source_files = self.codemap_import_info.borrow();

View File

@ -40,7 +40,7 @@ use rustc_data_structures::sync::Lrc;
use std::u32;
use syntax::ast::{self, CRATE_NODE_ID};
use syntax::attr;
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax::symbol::keywords;
use syntax_pos::{self, hygiene, FileName, SourceFile, Span};

View File

@ -16,7 +16,7 @@ use rustc::ty::TyCtxt;
use rustc::util::nodemap::FxHashSet;
use rustc_target::spec::abi::Abi;
use syntax::attr;
use syntax::codemap::Span;
use syntax::source_map::Span;
use syntax::feature_gate::{self, GateIssue};
use syntax::symbol::Symbol;

View File

@ -13,7 +13,7 @@ use borrow_check::nll::ToRegionVid;
use rustc::mir::{Local, Mir};
use rustc::ty::{RegionVid, TyCtxt};
use rustc_data_structures::indexed_vec::Idx;
use syntax::codemap::Span;
use syntax::source_map::Span;
use syntax_pos::symbol::Symbol;
impl<'tcx> RegionInferenceContext<'tcx> {

View File

@ -10,8 +10,8 @@ use rustc::ty::subst::Subst;
use rustc_data_structures::indexed_vec::IndexVec;
use syntax::ast::Mutability;
use syntax::codemap::Span;
use syntax::codemap::DUMMY_SP;
use syntax::source_map::Span;
use syntax::source_map::DUMMY_SP;
use rustc::mir::interpret::{
EvalResult, EvalError, EvalErrorKind, GlobalId,

View File

@ -18,7 +18,7 @@ use rustc::mir::interpret::{
ScalarMaybeUndef,
};
use syntax::codemap::{self, Span};
use syntax::source_map::{self, Span};
use syntax::ast::Mutability;
use super::{Place, PlaceExtra, Memory,
@ -91,7 +91,7 @@ pub struct Frame<'mir, 'tcx: 'mir> {
pub instance: ty::Instance<'tcx>,
/// The span of the call site.
pub span: codemap::Span,
pub span: source_map::Span,
////////////////////////////////////////////////////////////////////////////////
// Return place and locals
@ -545,7 +545,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
pub fn push_stack_frame(
&mut self,
instance: ty::Instance<'tcx>,
span: codemap::Span,
span: source_map::Span,
mir: &'mir mir::Mir<'tcx>,
return_place: Place,
return_to_block: StackPopCleanup,

View File

@ -10,7 +10,7 @@ use super::{EvalContext, Place, ValTy, Memory};
use rustc::mir;
use rustc::ty::{self, Ty};
use rustc::ty::layout::Size;
use syntax::codemap::Span;
use syntax::source_map::Span;
use syntax::ast::Mutability;
/// Methods of this trait signifies a point where CTFE evaluation would fail

View File

@ -1,6 +1,6 @@
use rustc::mir::BasicBlock;
use rustc::ty::{self, Ty};
use syntax::codemap::Span;
use syntax::source_map::Span;
use rustc::mir::interpret::{EvalResult, Value};
use interpret::{Machine, ValTy, EvalContext, Place, PlaceExtra};

View File

@ -1,7 +1,7 @@
use rustc::mir;
use rustc::ty::{self, Ty};
use rustc::ty::layout::{LayoutOf, Size};
use syntax::codemap::Span;
use syntax::source_map::Span;
use rustc_target::spec::abi::Abi;
use rustc::mir::interpret::{EvalResult, Scalar, Value};

View File

@ -26,7 +26,7 @@ use std::fmt::{self, Write};
use std::iter;
use rustc::mir::mono::Linkage;
use syntax_pos::symbol::Symbol;
use syntax::codemap::Span;
use syntax::source_map::Span;
pub use rustc::mir::mono::MonoItem;
/// Describes how a monomorphization will be instantiated in object files.

View File

@ -24,7 +24,7 @@ use interpret::EvalContext;
use interpret::CompileTimeEvaluator;
use interpret::{eval_promoted, mk_borrowck_eval_cx, ValTy};
use transform::{MirPass, MirSource};
use syntax::codemap::{Span, DUMMY_SP};
use syntax::source_map::{Span, DUMMY_SP};
use rustc::ty::subst::Substs;
use rustc_data_structures::indexed_vec::IndexVec;
use rustc::ty::ParamEnv;

View File

@ -20,7 +20,7 @@ use rustc::lint;
use rustc::session::Session;
use syntax::ast::*;
use syntax::attr;
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax::symbol::keywords;
use syntax::visit::{self, Visitor};
use syntax_pos::Span;

View File

@ -49,7 +49,7 @@ use rustc::util::nodemap::{NodeMap, NodeSet, FxHashMap, FxHashSet, DefIdMap};
use rustc_metadata::creader::CrateLoader;
use rustc_metadata::cstore::CStore;
use syntax::codemap::SourceMap;
use syntax::source_map::SourceMap;
use syntax::ext::hygiene::{Mark, Transparency, SyntaxContext};
use syntax::ast::{self, Name, NodeId, Ident, FloatTy, IntTy, UintTy};
use syntax::ext::base::SyntaxExtension;

View File

@ -41,7 +41,7 @@ use syntax::print::pprust::{
ty_to_string
};
use syntax::ptr::P;
use syntax::codemap::{Spanned, DUMMY_SP, respan};
use syntax::source_map::{Spanned, DUMMY_SP, respan};
use syntax_pos::*;
use {escape, generated_code, lower_attributes, PathCollector, SaveContext};

View File

@ -56,14 +56,14 @@ use std::fs::File;
use std::path::{Path, PathBuf};
use syntax::ast::{self, Attribute, NodeId, PatKind};
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax::parse::lexer::comments::strip_doc_comment_decoration;
use syntax::parse::token;
use syntax::print::pprust;
use syntax::symbol::keywords;
use syntax::visit::{self, Visitor};
use syntax::print::pprust::{arg_to_string, ty_to_string};
use syntax::codemap::MacroAttribute;
use syntax::source_map::MacroAttribute;
use syntax_pos::*;
use json_dumper::JsonDumper;

View File

@ -18,7 +18,7 @@ use rustc::ty::subst::{Subst, Substs};
use rustc::ty::{self, ParamEnvAnd, Ty, TyCtxt};
use rustc::util::nodemap::FxHashSet;
use rustc_data_structures::sync::Lrc;
use syntax::codemap::{Span, DUMMY_SP};
use syntax::source_map::{Span, DUMMY_SP};
crate fn provide(p: &mut Providers) {
*p = Providers {

View File

@ -13,7 +13,7 @@ use rustc::traits::{EvaluationResult, Obligation, ObligationCause,
use rustc::traits::query::CanonicalPredicateGoal;
use rustc::ty::query::Providers;
use rustc::ty::{ParamEnvAnd, TyCtxt};
use syntax::codemap::DUMMY_SP;
use syntax::source_map::DUMMY_SP;
crate fn provide(p: &mut Providers) {
*p = Providers {

View File

@ -21,7 +21,7 @@ use rustc::ty::outlives::Component;
use rustc::ty::query::Providers;
use rustc::ty::wf;
use syntax::ast::DUMMY_NODE_ID;
use syntax::codemap::DUMMY_SP;
use syntax::source_map::DUMMY_SP;
use rustc::traits::FulfillmentContext;
use rustc_data_structures::sync::Lrc;

View File

@ -22,7 +22,7 @@ use util::nodemap::FxHashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::cmp;
use syntax::ast;
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax::ptr::P;
use syntax_pos::Span;

View File

@ -24,7 +24,7 @@ use rustc::ty::subst::Substs;
use std::cmp;
use std::iter;
use rustc_target::spec::abi::Abi;
use syntax::codemap::Span;
use syntax::source_map::Span;
use rustc::hir;
/// What signature do we *expect* the closure to have from context?

View File

@ -122,7 +122,7 @@ use std::ops::{self, Deref};
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::attr;
use syntax::codemap::original_sp;
use syntax::source_map::original_sp;
use syntax::feature_gate::{GateIssue, emit_feature_err};
use syntax::ptr::P;
use syntax::symbol::{Symbol, LocalInternedString, keywords};

View File

@ -43,7 +43,7 @@ use rustc_target::spec::abi;
use syntax::ast;
use syntax::ast::MetaItemKind;
use syntax::attr::{InlineAttr, list_contains_name, mark_used};
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax::symbol::{Symbol, keywords};
use syntax::feature_gate;
use syntax_pos::{Span, DUMMY_SP};

View File

@ -417,7 +417,7 @@ mod test {
use syntax::symbol::Symbol;
use syntax::ast::*;
use syntax::codemap::dummy_spanned;
use syntax::source_map::dummy_spanned;
use syntax_pos::DUMMY_SP;
use syntax::with_globals;

View File

@ -21,7 +21,7 @@ pub use self::Visibility::{Public, Inherited};
use rustc_target::spec::abi::Abi;
use syntax::ast::{self, AttrStyle, Ident};
use syntax::attr;
use syntax::codemap::{dummy_spanned, Spanned};
use syntax::source_map::{dummy_spanned, Spanned};
use syntax::ptr::P;
use syntax::symbol::keywords::{self, Keyword};
use syntax::symbol::InternedString;

View File

@ -27,7 +27,7 @@ use rustc_metadata::cstore::CStore;
use rustc_target::spec::TargetTriple;
use syntax::ast::{self, Ident};
use syntax::codemap;
use syntax::source_map;
use syntax::edition::Edition;
use syntax::feature_gate::UnstableFeatures;
use syntax::json::JsonEmitter;
@ -260,7 +260,7 @@ impl DocAccessLevels for AccessLevels<DefId> {
///
/// If the given `error_format` is `ErrorOutputType::Json` and no `SourceMap` is given, a new one
/// will be created for the handler.
pub fn new_handler(error_format: ErrorOutputType, codemap: Option<Lrc<codemap::SourceMap>>)
pub fn new_handler(error_format: ErrorOutputType, codemap: Option<Lrc<source_map::SourceMap>>)
-> errors::Handler
{
// rustdoc doesn't override (or allow to override) anything from this that is relevant here, so
@ -277,7 +277,7 @@ pub fn new_handler(error_format: ErrorOutputType, codemap: Option<Lrc<codemap::S
),
ErrorOutputType::Json(pretty) => {
let codemap = codemap.unwrap_or_else(
|| Lrc::new(codemap::SourceMap::new(sessopts.file_path_mapping())));
|| Lrc::new(source_map::SourceMap::new(sessopts.file_path_mapping())));
Box::new(
JsonEmitter::stderr(
None,
@ -387,7 +387,7 @@ pub fn run_core(search_paths: SearchPaths,
..Options::default()
};
driver::spawn_thread_pool(sessopts, move |sessopts| {
let codemap = Lrc::new(codemap::SourceMap::new(sessopts.file_path_mapping()));
let codemap = Lrc::new(source_map::SourceMap::new(sessopts.file_path_mapping()));
let diagnostic_handler = new_handler(error_format, Some(codemap.clone()));
let mut sess = session::build_session_(

View File

@ -16,7 +16,7 @@ use syntax::ast;
use syntax::ast::{Name, NodeId};
use syntax::attr;
use syntax::ptr::P;
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax_pos::{self, Span};
use rustc::hir;

View File

@ -21,7 +21,7 @@ use std::fmt::Display;
use std::io;
use std::io::prelude::*;
use syntax::codemap::{SourceMap, FilePathMapping};
use syntax::source_map::{SourceMap, FilePathMapping};
use syntax::parse::lexer::{self, TokenAndSpan};
use syntax::parse::token;
use syntax::parse;

View File

@ -56,7 +56,7 @@ use externalfiles::ExternalHtml;
use serialize::json::{ToJson, Json, as_json};
use syntax::ast;
use syntax::codemap::FileName;
use syntax::source_map::FileName;
use syntax::feature_gate::UnstableFeatures;
use rustc::hir::def_id::{CrateNum, CRATE_DEF_INDEX, DefId};
use rustc::middle::privacy::AccessLevels;

View File

@ -19,7 +19,7 @@ use getopts;
use testing;
use rustc::session::search_paths::SearchPaths;
use rustc::session::config::{Externs, CodegenOptions};
use syntax::codemap::DUMMY_SP;
use syntax::source_map::DUMMY_SP;
use syntax::feature_gate::UnstableFeatures;
use syntax::edition::Edition;

View File

@ -33,7 +33,7 @@ use rustc_driver::driver::phase_2_configure_and_expand;
use rustc_metadata::cstore::CStore;
use rustc_resolve::MakeGlobMap;
use syntax::ast;
use syntax::codemap::SourceMap;
use syntax::source_map::SourceMap;
use syntax::edition::Edition;
use syntax::feature_gate::UnstableFeatures;
use syntax::with_globals;

View File

@ -15,7 +15,7 @@ use std::mem;
use syntax::ast;
use syntax::attr;
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax_pos::{self, Span};
use rustc::hir::map as hir_map;

View File

@ -16,7 +16,7 @@ pub use symbol::{Ident, Symbol as Name};
pub use util::parser::ExprPrecedence;
use syntax_pos::{Span, DUMMY_SP};
use codemap::{dummy_spanned, respan, Spanned};
use source_map::{dummy_spanned, respan, Spanned};
use rustc_target::spec::abi::Abi;
use ext::hygiene::{Mark, SyntaxContext};
use print::pprust;

View File

@ -25,7 +25,7 @@ use ast;
use ast::{AttrId, Attribute, AttrStyle, Name, Ident, Path, PathSegment};
use ast::{MetaItem, MetaItemKind, NestedMetaItem, NestedMetaItemKind};
use ast::{Lit, LitKind, Expr, ExprKind, Item, Local, Stmt, StmtKind, GenericParam};
use codemap::{BytePos, Spanned, respan, dummy_spanned};
use source_map::{BytePos, Spanned, respan, dummy_spanned};
use syntax_pos::{FileName, Span};
use parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration};
use parse::parser::Parser;

View File

@ -12,7 +12,7 @@ use attr::HasAttrs;
use feature_gate::{feature_err, EXPLAIN_STMT_ATTR_SYNTAX, Features, get_features, GateIssue};
use {fold, attr};
use ast;
use codemap::Spanned;
use source_map::Spanned;
use edition::Edition;
use parse::{token, ParseSess};
use OneVector;

View File

@ -13,7 +13,7 @@ use std::env;
use ast;
use ast::{Ident, Name};
use codemap;
use source_map;
use syntax_pos::Span;
use ext::base::{ExtCtxt, MacEager, MacResult};
use ext::build::AstBuilder;
@ -223,7 +223,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt,
ty,
expr,
),
vis: codemap::respan(span.shrink_to_lo(), ast::VisibilityKind::Public),
vis: source_map::respan(span.shrink_to_lo(), ast::VisibilityKind::Public),
span,
tokens: None,
})

View File

@ -12,7 +12,7 @@ pub use self::SyntaxExtension::*;
use ast::{self, Attribute, Name, PatKind, MetaItem};
use attr::HasAttrs;
use codemap::{self, SourceMap, Spanned, respan};
use source_map::{self, SourceMap, Spanned, respan};
use syntax_pos::{Span, MultiSpan, DUMMY_SP};
use edition::Edition;
use errors::{DiagnosticBuilder, DiagnosticId};
@ -481,7 +481,7 @@ impl DummyResult {
pub fn raw_expr(sp: Span) -> P<ast::Expr> {
P(ast::Expr {
id: ast::DUMMY_NODE_ID,
node: ast::ExprKind::Lit(P(codemap::respan(sp, ast::LitKind::Bool(false)))),
node: ast::ExprKind::Lit(P(source_map::respan(sp, ast::LitKind::Bool(false)))),
span: sp,
attrs: ThinVec::new(),
})

View File

@ -12,7 +12,7 @@ use rustc_target::spec::abi::Abi;
use ast::{self, Ident, Generics, Expr, BlockCheckMode, UnOp, PatKind};
use attr;
use syntax_pos::{Pos, Span, DUMMY_SP};
use codemap::{dummy_spanned, respan, Spanned};
use source_map::{dummy_spanned, respan, Spanned};
use ext::base::ExtCtxt;
use ptr::P;
use symbol::{Symbol, keywords};

View File

@ -10,7 +10,7 @@
use attr::HasAttrs;
use ast;
use codemap::{hygiene, ExpnInfo, ExpnFormat};
use source_map::{hygiene, ExpnInfo, ExpnFormat};
use ext::base::ExtCtxt;
use ext::build::AstBuilder;
use parse::parser::PathStyle;

View File

@ -11,7 +11,7 @@
use ast::{self, Block, Ident, NodeId, PatKind, Path};
use ast::{MacStmtStyle, StmtKind, ItemKind};
use attr::{self, HasAttrs};
use codemap::{ExpnInfo, MacroBang, MacroAttribute, dummy_spanned, respan};
use source_map::{ExpnInfo, MacroBang, MacroAttribute, dummy_spanned, respan};
use config::{is_test_or_bench, StripUnconfigured};
use errors::{Applicability, FatalError};
use ext::base::*;

View File

@ -9,7 +9,7 @@
// except according to those terms.
use ast::{self, NodeId};
use codemap::{DUMMY_SP, dummy_spanned};
use source_map::{DUMMY_SP, dummy_spanned};
use ext::base::ExtCtxt;
use ext::expand::{AstFragment, AstFragmentKind};
use ext::hygiene::Mark;

View File

@ -9,7 +9,7 @@
// except according to those terms.
use ast::{self, Arg, Arm, Block, Expr, Item, Pat, Stmt, Ty};
use codemap::respan;
use source_map::respan;
use syntax_pos::Span;
use ext::base::ExtCtxt;
use ext::base;
@ -28,7 +28,7 @@ use tokenstream::{TokenStream, TokenTree};
pub mod rt {
use ast;
use codemap::Spanned;
use source_map::Spanned;
use ext::base::ExtCtxt;
use parse::{self, classify};
use parse::token::{self, Token};
@ -40,7 +40,7 @@ pub mod rt {
pub use parse::new_parser_from_tts;
pub use syntax_pos::{BytePos, Span, DUMMY_SP, FileName};
pub use codemap::{dummy_spanned};
pub use source_map::{dummy_spanned};
pub trait ToTokens {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree>;

View File

@ -29,7 +29,7 @@ use rustc_data_structures::fx::FxHashMap;
use rustc_target::spec::abi::Abi;
use ast::{self, NodeId, PatKind, RangeEnd};
use attr;
use codemap::Spanned;
use source_map::Spanned;
use edition::{ALL_EDITIONS, Edition};
use syntax_pos::{Span, DUMMY_SP};
use errors::{DiagnosticBuilder, Handler};

View File

@ -21,7 +21,7 @@
use ast::*;
use ast;
use syntax_pos::Span;
use codemap::{Spanned, respan};
use source_map::{Spanned, respan};
use parse::token::{self, Token};
use ptr::P;
use OneVector;

View File

@ -19,7 +19,7 @@
// FIXME spec the JSON output properly.
use codemap::{SourceMap, FilePathMapping};
use source_map::{SourceMap, FilePathMapping};
use syntax_pos::{self, MacroBacktrace, Span, SpanLabel, MultiSpan};
use errors::registry::Registry;
use errors::{DiagnosticBuilder, SubDiagnostic, CodeSuggestion, SourceMapper};

View File

@ -145,7 +145,7 @@ pub mod syntax {
pub mod ast;
pub mod attr;
pub mod codemap;
pub mod source_map;
#[macro_use]
pub mod config;
pub mod entry;

View File

@ -10,7 +10,7 @@
use attr;
use ast;
use codemap::respan;
use source_map::respan;
use parse::{SeqSep, PResult};
use parse::token::{self, Nonterminal, DelimToken};
use parse::parser::{Parser, TokenType, PathStyle};

View File

@ -11,7 +11,7 @@
pub use self::CommentStyle::*;
use ast;
use codemap::SourceMap;
use source_map::SourceMap;
use syntax_pos::{BytePos, CharPos, Pos, FileName};
use parse::lexer::{is_block_doc_comment, is_pattern_whitespace};
use parse::lexer::{self, ParseSess, StringReader, TokenAndSpan};

View File

@ -10,7 +10,7 @@
use ast::{self, Ident};
use syntax_pos::{self, BytePos, CharPos, Pos, Span, NO_EXPANSION};
use codemap::{SourceMap, FilePathMapping};
use source_map::{SourceMap, FilePathMapping};
use errors::{Applicability, FatalError, DiagnosticBuilder};
use parse::{token, ParseSess};
use str::char_at;
@ -1827,7 +1827,7 @@ mod tests {
use ast::{Ident, CrateConfig};
use symbol::Symbol;
use syntax_pos::{BytePos, Span, NO_EXPANSION};
use codemap::SourceMap;
use source_map::SourceMap;
use errors;
use feature_gate::UnstableFeatures;
use parse::token;

View File

@ -13,7 +13,7 @@
use rustc_data_structures::sync::{Lrc, Lock};
use ast::{self, CrateConfig, NodeId};
use early_buffered_lints::{BufferedEarlyLint, BufferedEarlyLintId};
use codemap::{SourceMap, FilePathMapping};
use source_map::{SourceMap, FilePathMapping};
use syntax_pos::{Span, SourceFile, FileName, MultiSpan};
use errors::{Handler, ColorConfig, DiagnosticBuilder};
use feature_gate::UnstableFeatures;

View File

@ -42,7 +42,7 @@ use ast::{UseTree, UseTreeKind};
use ast::{BinOpKind, UnOp};
use ast::{RangeEnd, RangeSyntax};
use {ast, attr};
use codemap::{self, SourceMap, Spanned, respan};
use source_map::{self, SourceMap, Spanned, respan};
use syntax_pos::{self, Span, MultiSpan, BytePos, FileName, edition::Edition};
use errors::{self, Applicability, DiagnosticBuilder, DiagnosticId};
use parse::{self, SeqSep, classify, token};
@ -1879,7 +1879,7 @@ impl<'a> Parser<'a> {
let lit = self.parse_lit_token()?;
lit
};
Ok(codemap::Spanned { node: lit, span: lo.to(self.prev_span) })
Ok(source_map::Spanned { node: lit, span: lo.to(self.prev_span) })
}
/// matches '-' lit | lit (cf. ast_validation::AstValidator::check_expr_within_pat)
@ -2185,7 +2185,7 @@ impl<'a> Parser<'a> {
pub fn mk_mac_expr(&mut self, span: Span, m: Mac_, attrs: ThinVec<Attribute>) -> P<Expr> {
P(Expr {
id: ast::DUMMY_NODE_ID,
node: ExprKind::Mac(codemap::Spanned {node: m, span: span}),
node: ExprKind::Mac(source_map::Spanned {node: m, span: span}),
span,
attrs,
})
@ -3074,7 +3074,7 @@ impl<'a> Parser<'a> {
AssocOp::Equal | AssocOp::Less | AssocOp::LessEqual | AssocOp::NotEqual |
AssocOp::Greater | AssocOp::GreaterEqual => {
let ast_op = op.to_ast_binop().unwrap();
let binary = self.mk_binary(codemap::respan(cur_op_span, ast_op), lhs, rhs);
let binary = self.mk_binary(source_map::respan(cur_op_span, ast_op), lhs, rhs);
self.mk_expr(span, binary, ThinVec::new())
}
AssocOp::Assign =>
@ -3094,7 +3094,7 @@ impl<'a> Parser<'a> {
token::Shl => BinOpKind::Shl,
token::Shr => BinOpKind::Shr,
};
let aopexpr = self.mk_assign_op(codemap::respan(cur_op_span, aop), lhs, rhs);
let aopexpr = self.mk_assign_op(source_map::respan(cur_op_span, aop), lhs, rhs);
self.mk_expr(span, aopexpr, ThinVec::new())
}
AssocOp::As | AssocOp::Colon | AssocOp::DotDot | AssocOp::DotDotEq => {
@ -3736,7 +3736,7 @@ impl<'a> Parser<'a> {
&mut self,
lo: Span,
attrs: Vec<Attribute>
) -> PResult<'a, codemap::Spanned<ast::FieldPat>> {
) -> PResult<'a, source_map::Spanned<ast::FieldPat>> {
// Check if a colon exists one ahead. This means we're parsing a fieldname.
let hi;
let (subpat, fieldname, is_shorthand) = if self.look_ahead(1, |t| t == &token::Colon) {
@ -3779,7 +3779,7 @@ impl<'a> Parser<'a> {
(subpat, fieldname, true)
};
Ok(codemap::Spanned {
Ok(source_map::Spanned {
span: lo.to(hi),
node: ast::FieldPat {
ident: fieldname,
@ -3791,7 +3791,7 @@ impl<'a> Parser<'a> {
}
/// Parse the fields of a struct-like pattern
fn parse_pat_fields(&mut self) -> PResult<'a, (Vec<codemap::Spanned<ast::FieldPat>>, bool)> {
fn parse_pat_fields(&mut self) -> PResult<'a, (Vec<source_map::Spanned<ast::FieldPat>>, bool)> {
let mut fields = Vec::new();
let mut etc = false;
let mut ate_comma = true;
@ -4518,7 +4518,7 @@ impl<'a> Parser<'a> {
}
} else if let Some(macro_def) = self.eat_macro_def(
&attrs,
&codemap::respan(lo, VisibilityKind::Inherited),
&source_map::respan(lo, VisibilityKind::Inherited),
lo,
)? {
Stmt {
@ -5398,7 +5398,7 @@ impl<'a> Parser<'a> {
_ => return Ok(None),
};
let eself = codemap::respan(eself_lo.to(eself_hi), eself);
let eself = source_map::respan(eself_lo.to(eself_hi), eself);
Ok(Some(Arg::from_self(eself, eself_ident)))
}

View File

@ -16,7 +16,7 @@ use ast::{SelfKind, GenericBound, TraitBoundModifier};
use ast::{Attribute, MacDelimiter, GenericArg};
use util::parser::{self, AssocOp, Fixity};
use attr;
use codemap::{self, SourceMap, Spanned};
use source_map::{self, SourceMap, Spanned};
use syntax_pos::{self, BytePos};
use syntax_pos::hygiene::{Mark, SyntaxContext};
use parse::token::{self, BinOpToken, Token};
@ -380,7 +380,7 @@ pub fn fun_to_string(decl: &ast::FnDecl,
to_string(|s| {
s.head("")?;
s.print_fn(decl, header, Some(name),
generics, &codemap::dummy_spanned(ast::VisibilityKind::Inherited))?;
generics, &source_map::dummy_spanned(ast::VisibilityKind::Inherited))?;
s.end()?; // Close the head box
s.end() // Close the outer box
})
@ -1606,7 +1606,7 @@ impl<'a> State<'a> {
ti.ident,
ty,
default.as_ref().map(|expr| &**expr),
&codemap::respan(ti.span.shrink_to_lo(), ast::VisibilityKind::Inherited),
&source_map::respan(ti.span.shrink_to_lo(), ast::VisibilityKind::Inherited),
)?;
}
ast::TraitItemKind::Method(ref sig, ref body) => {
@ -1617,7 +1617,7 @@ impl<'a> State<'a> {
ti.ident,
&ti.generics,
sig,
&codemap::respan(ti.span.shrink_to_lo(), ast::VisibilityKind::Inherited),
&source_map::respan(ti.span.shrink_to_lo(), ast::VisibilityKind::Inherited),
)?;
if let Some(ref body) = *body {
self.nbsp()?;
@ -3085,7 +3085,7 @@ impl<'a> State<'a> {
ast::FnHeader { unsafety, abi, ..ast::FnHeader::default() },
name,
&generics,
&codemap::dummy_spanned(ast::VisibilityKind::Inherited))?;
&source_map::dummy_spanned(ast::VisibilityKind::Inherited))?;
self.end()
}
@ -3185,7 +3185,7 @@ mod tests {
use super::*;
use ast;
use codemap;
use source_map;
use syntax_pos;
use with_globals;
@ -3205,7 +3205,7 @@ mod tests {
&decl,
ast::FnHeader {
unsafety: ast::Unsafety::Normal,
constness: codemap::dummy_spanned(ast::Constness::NotConst),
constness: source_map::dummy_spanned(ast::Constness::NotConst),
asyncness: ast::IsAsync::NotAsync,
abi: Abi::Rust,
},
@ -3222,7 +3222,7 @@ mod tests {
with_globals(|| {
let ident = ast::Ident::from_str("principal_skinner");
let var = codemap::respan(syntax_pos::DUMMY_SP, ast::Variant_ {
let var = source_map::respan(syntax_pos::DUMMY_SP, ast::Variant_ {
ident,
attrs: Vec::new(),
// making this up as I go.... ?

View File

@ -16,7 +16,7 @@ use edition::Edition;
use ext::hygiene::{Mark, SyntaxContext};
use symbol::{Symbol, keywords};
use syntax_pos::{DUMMY_SP, Span};
use codemap::{ExpnInfo, MacroAttribute, dummy_spanned, hygiene, respan};
use source_map::{ExpnInfo, MacroAttribute, dummy_spanned, hygiene, respan};
use ptr::P;
use tokenstream::TokenStream;

View File

@ -22,7 +22,7 @@ use std::vec;
use attr::{self, HasAttrs};
use syntax_pos::{self, DUMMY_SP, NO_EXPANSION, Span, SourceFile, BytePos};
use codemap::{self, SourceMap, ExpnInfo, MacroAttribute, dummy_spanned};
use source_map::{self, SourceMap, ExpnInfo, MacroAttribute, dummy_spanned};
use errors;
use config;
use entry::{self, EntryPointType};
@ -616,8 +616,8 @@ fn mk_test_module(cx: &mut TestCtxt) -> (P<ast::Item>, Option<P<ast::Item>>) {
(item, reexport)
}
fn nospan<T>(t: T) -> codemap::Spanned<T> {
codemap::Spanned { node: t, span: DUMMY_SP }
fn nospan<T>(t: T) -> source_map::Spanned<T> {
source_map::Spanned { node: t, span: DUMMY_SP }
}
fn path_node(ids: Vec<Ident>) -> ast::Path {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use codemap::{SourceMap, FilePathMapping};
use source_map::{SourceMap, FilePathMapping};
use errors::Handler;
use errors::emitter::EmitterWriter;
use std::io;

View File

@ -9,7 +9,7 @@
// except according to those terms.
use ast::{self, Ident};
use codemap::FilePathMapping;
use source_map::FilePathMapping;
use parse::{ParseSess, PResult, source_file_to_stream};
use parse::{lexer, new_parser_from_source_str};
use parse::parser::Parser;

View File

@ -9,7 +9,7 @@
// except according to those terms.
use syntax::ast::*;
use syntax::codemap::Spanned;
use syntax::source_map::Spanned;
use syntax::ext::base::*;
use syntax::ext::build::AstBuilder;
use syntax::parse::token;

View File

@ -14,7 +14,7 @@ use errors::FatalError;
use proc_macro::{TokenStream, __internal};
use syntax::ast::{self, ItemKind, Attribute, Mac};
use syntax::attr::{mark_used, mark_known};
use syntax::codemap::Span;
use syntax::source_map::Span;
use syntax::ext::base::*;
use syntax::visit::Visitor;

View File

@ -198,7 +198,7 @@ use syntax::ast::{VariantData, GenericParamKind, GenericArg};
use syntax::attr;
use syntax::ext::base::{Annotatable, ExtCtxt};
use syntax::ext::build::AstBuilder;
use syntax::codemap::{self, respan};
use syntax::source_map::{self, respan};
use syntax::util::move_map::MoveMap;
use syntax::ptr::P;
use syntax::symbol::{Symbol, keywords};
@ -1619,7 +1619,7 @@ impl<'a> TraitDef<'a> {
if ident.is_none() {
cx.span_bug(sp, "a braced struct with unnamed fields in `derive`");
}
codemap::Spanned {
source_map::Spanned {
span: pat.span.with_ctxt(self.span.ctxt()),
node: ast::FieldPat {
ident: ident.unwrap(),

View File

@ -18,7 +18,7 @@ use syntax::ast;
use syntax::ast::{Expr, GenericParamKind, Generics, Ident, SelfKind, GenericArg};
use syntax::ext::base::ExtCtxt;
use syntax::ext::build::AstBuilder;
use syntax::codemap::{respan, DUMMY_SP};
use syntax::source_map::{respan, DUMMY_SP};
use syntax::ptr::P;
use syntax_pos::Span;
use syntax_pos::symbol::keywords;

View File

@ -21,7 +21,7 @@
use rustc_data_structures::small_vec::OneVector;
use syntax::ast;
use syntax::codemap::respan;
use syntax::source_map::respan;
use syntax::ext::base;
use syntax::ext::base::*;
use syntax::feature_gate;

View File

@ -12,7 +12,7 @@ use std::panic;
use errors::FatalError;
use syntax::codemap::Span;
use syntax::source_map::Span;
use syntax::ext::base::*;
use syntax::tokenstream::TokenStream;
use syntax::ext::base;

View File

@ -14,7 +14,7 @@ use errors;
use syntax::ast::{self, Ident};
use syntax::attr;
use syntax::codemap::{ExpnInfo, MacroAttribute, hygiene, respan};
use syntax::source_map::{ExpnInfo, MacroAttribute, hygiene, respan};
use syntax::ext::base::ExtCtxt;
use syntax::ext::build::AstBuilder;
use syntax::ext::expand::ExpansionConfig;

View File

@ -16,7 +16,7 @@ extern crate syntax;
extern crate syntax_pos;
use syntax::ast;
use syntax::codemap::FilePathMapping;
use syntax::source_map::FilePathMapping;
use syntax::print::pprust;
use syntax::symbol::Symbol;
use syntax_pos::DUMMY_SP;

View File

@ -18,7 +18,7 @@ extern crate syntax;
extern crate syntax_pos;
use syntax::ast;
use syntax::codemap;
use syntax::source_map;
use syntax::print::pprust;
use syntax::symbol::Symbol;
use syntax_pos::DUMMY_SP;
@ -28,7 +28,7 @@ fn main() {
}
fn run() {
let ps = syntax::parse::ParseSess::new(codemap::FilePathMapping::empty());
let ps = syntax::parse::ParseSess::new(source_map::FilePathMapping::empty());
let mut resolver = syntax::ext::base::DummyResolver;
let mut cx = syntax::ext::base::ExtCtxt::new(
&ps,

View File

@ -24,7 +24,7 @@ use rustc::session::config::{Input, Options,
use rustc_driver::driver::{self, compile_input, CompileController};
use rustc_metadata::cstore::CStore;
use rustc_errors::registry::Registry;
use syntax::codemap::FileName;
use syntax::source_map::FileName;
use rustc_codegen_utils::codegen_backend::CodegenBackend;
use std::path::PathBuf;

View File

@ -17,7 +17,7 @@ extern crate syntax;
use syntax::ast::*;
use syntax::attr::*;
use syntax::ast;
use syntax::codemap::{FilePathMapping, FileName};
use syntax::source_map::{FilePathMapping, FileName};
use syntax::parse;
use syntax::parse::{ParseSess, PResult};
use syntax::parse::new_parser_from_source_str;

View File

@ -22,7 +22,7 @@ use deriving::generic::ty::*;
use rustc_plugin::Registry;
use syntax::ast::*;
use syntax::codemap::Span;
use syntax::source_map::Span;
use syntax::ext::base::*;
use syntax::ext::build::AstBuilder;
use syntax::symbol::Symbol;

View File

@ -18,7 +18,7 @@ extern crate rustc_plugin;
extern crate syntax_pos;
use syntax::ast::{self, Item, MetaItem, ItemKind};
use syntax::codemap::DUMMY_SP;
use syntax::source_map::DUMMY_SP;
use syntax::ext::base::*;
use syntax::ext::quote::rt::ToTokens;
use syntax::parse::{self, token};

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