mv (mod) codemap source_map
This commit is contained in:
parent
cbd0595710
commit
82607d2cf3
104 changed files with 157 additions and 153 deletions
|
@ -68,7 +68,7 @@ use syntax::errors;
|
||||||
use syntax::ext::hygiene::{Mark, SyntaxContext};
|
use syntax::ext::hygiene::{Mark, SyntaxContext};
|
||||||
use syntax::print::pprust;
|
use syntax::print::pprust;
|
||||||
use syntax::ptr::P;
|
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::std_inject;
|
||||||
use syntax::symbol::{keywords, Symbol};
|
use syntax::symbol::{keywords, Symbol};
|
||||||
use syntax::tokenstream::{Delimited, TokenStream, TokenTree};
|
use syntax::tokenstream::{Delimited, TokenStream, TokenTree};
|
||||||
|
@ -614,14 +614,14 @@ impl<'a> LoweringContext<'a> {
|
||||||
|
|
||||||
fn allow_internal_unstable(&self, reason: CompilerDesugaringKind, span: Span) -> Span {
|
fn allow_internal_unstable(&self, reason: CompilerDesugaringKind, span: Span) -> Span {
|
||||||
let mark = Mark::fresh(Mark::root());
|
let mark = Mark::fresh(Mark::root());
|
||||||
mark.set_expn_info(codemap::ExpnInfo {
|
mark.set_expn_info(source_map::ExpnInfo {
|
||||||
call_site: span,
|
call_site: span,
|
||||||
def_site: Some(span),
|
def_site: Some(span),
|
||||||
format: codemap::CompilerDesugaring(reason),
|
format: source_map::CompilerDesugaring(reason),
|
||||||
allow_internal_unstable: true,
|
allow_internal_unstable: true,
|
||||||
allow_internal_unsafe: false,
|
allow_internal_unsafe: false,
|
||||||
local_inner_macros: false,
|
local_inner_macros: false,
|
||||||
edition: codemap::hygiene::default_edition(),
|
edition: source_map::hygiene::default_edition(),
|
||||||
});
|
});
|
||||||
span.with_ctxt(SyntaxContext::empty().apply_mark(mark))
|
span.with_ctxt(SyntaxContext::empty().apply_mark(mark))
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ use middle::cstore::CrateStore;
|
||||||
use session::CrateDisambiguator;
|
use session::CrateDisambiguator;
|
||||||
use std::iter::repeat;
|
use std::iter::repeat;
|
||||||
use syntax::ast::{NodeId, CRATE_NODE_ID};
|
use syntax::ast::{NodeId, CRATE_NODE_ID};
|
||||||
use syntax::codemap::SourceMap;
|
use syntax::source_map::SourceMap;
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
|
|
||||||
use ich::StableHashingContext;
|
use ich::StableHashingContext;
|
||||||
|
|
|
@ -24,7 +24,7 @@ use middle::cstore::CrateStore;
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use rustc_data_structures::svh::Svh;
|
use rustc_data_structures::svh::Svh;
|
||||||
use syntax::ast::{self, Name, NodeId, CRATE_NODE_ID};
|
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::ext::base::MacroKind;
|
||||||
use syntax_pos::{Span, DUMMY_SP};
|
use syntax_pos::{Span, DUMMY_SP};
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ use util::nodemap::{NodeMap, FxHashSet};
|
||||||
use mir::mono::Linkage;
|
use mir::mono::Linkage;
|
||||||
|
|
||||||
use syntax_pos::{Span, DUMMY_SP, symbol::InternedString};
|
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 rustc_target::spec::abi::Abi;
|
||||||
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, DUMMY_NODE_ID, AsmDialect};
|
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, DUMMY_NODE_ID, AsmDialect};
|
||||||
use syntax::ast::{Attribute, Lit, StrStyle, FloatTy, IntTy, UintTy, MetaItem};
|
use syntax::ast::{Attribute, Lit, StrStyle, FloatTy, IntTy, UintTy, MetaItem};
|
||||||
|
@ -1100,7 +1100,7 @@ pub type Stmt = Spanned<StmtKind>;
|
||||||
impl fmt::Debug for StmtKind {
|
impl fmt::Debug for StmtKind {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
// Sadness.
|
// Sadness.
|
||||||
let spanned = codemap::dummy_spanned(self.clone());
|
let spanned = source_map::dummy_spanned(self.clone());
|
||||||
write!(f,
|
write!(f,
|
||||||
"stmt({}: {})",
|
"stmt({}: {})",
|
||||||
spanned.node.id(),
|
spanned.node.id(),
|
||||||
|
|
|
@ -12,7 +12,7 @@ pub use self::AnnNode::*;
|
||||||
|
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::{SourceMap, Spanned};
|
use syntax::source_map::{SourceMap, Spanned};
|
||||||
use syntax::parse::ParseSess;
|
use syntax::parse::ParseSess;
|
||||||
use syntax::parse::lexer::comments;
|
use syntax::parse::lexer::comments;
|
||||||
use syntax::print::pp::{self, Breaks};
|
use syntax::print::pp::{self, Breaks};
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use rustc_data_structures::sync::Lrc;
|
use rustc_data_structures::sync::Lrc;
|
||||||
use syntax::codemap::SourceMap;
|
use syntax::source_map::SourceMap;
|
||||||
use syntax_pos::{BytePos, SourceFile};
|
use syntax_pos::{BytePos, SourceFile};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
@ -25,7 +25,7 @@ use std::cell::RefCell;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
|
|
||||||
use syntax::codemap::SourceMap;
|
use syntax::source_map::SourceMap;
|
||||||
use syntax::ext::hygiene::SyntaxContext;
|
use syntax::ext::hygiene::SyntaxContext;
|
||||||
use syntax::symbol::Symbol;
|
use syntax::symbol::Symbol;
|
||||||
use syntax_pos::{Span, DUMMY_SP};
|
use syntax_pos::{Span, DUMMY_SP};
|
||||||
|
|
|
@ -37,7 +37,7 @@ use rustc_data_structures::small_vec::SmallVec;
|
||||||
use rustc_data_structures::sync::Lrc;
|
use rustc_data_structures::sync::Lrc;
|
||||||
use serialize::UseSpecializedDecodable;
|
use serialize::UseSpecializedDecodable;
|
||||||
use std::ops::Index;
|
use std::ops::Index;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use ty::fold::TypeFoldable;
|
use ty::fold::TypeFoldable;
|
||||||
use ty::subst::Kind;
|
use ty::subst::Kind;
|
||||||
use ty::{self, CanonicalVar, Lift, Region, Slice, TyCtxt};
|
use ty::{self, CanonicalVar, Lift, Region, Slice, TyCtxt};
|
||||||
|
|
|
@ -13,7 +13,7 @@ use hir::intravisit::{self, Visitor, NestedVisitorMap};
|
||||||
use infer::InferCtxt;
|
use infer::InferCtxt;
|
||||||
use infer::type_variable::TypeVariableOrigin;
|
use infer::type_variable::TypeVariableOrigin;
|
||||||
use ty::{self, Ty, TyInfer, TyVar};
|
use ty::{self, Ty, TyInfer, TyVar};
|
||||||
use syntax::codemap::CompilerDesugaringKind;
|
use syntax::source_map::CompilerDesugaringKind;
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
use errors::DiagnosticBuilder;
|
use errors::DiagnosticBuilder;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
use infer::InferCtxt;
|
use infer::InferCtxt;
|
||||||
use infer::lexical_region_resolve::RegionResolutionError;
|
use infer::lexical_region_resolve::RegionResolutionError;
|
||||||
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 ty::{self, TyCtxt};
|
||||||
use util::common::ErrorReported;
|
use util::common::ErrorReported;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ use errors::{Applicability, DiagnosticBuilder};
|
||||||
use lint::{LintPass, LateLintPass, LintArray};
|
use lint::{LintPass, LateLintPass, LintArray};
|
||||||
use session::Session;
|
use session::Session;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
|
|
||||||
declare_lint! {
|
declare_lint! {
|
||||||
pub EXCEEDING_BITSHIFTS,
|
pub EXCEEDING_BITSHIFTS,
|
||||||
|
|
|
@ -21,7 +21,7 @@ use rustc_data_structures::stable_hasher::{HashStable, ToStableHashKey,
|
||||||
use session::Session;
|
use session::Session;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::MultiSpan;
|
use syntax::source_map::MultiSpan;
|
||||||
use syntax::feature_gate;
|
use syntax::feature_gate;
|
||||||
use syntax::symbol::Symbol;
|
use syntax::symbol::Symbol;
|
||||||
use util::nodemap::FxHashMap;
|
use util::nodemap::FxHashMap;
|
||||||
|
|
|
@ -42,7 +42,7 @@ use lint::builtin::parser::QUESTION_MARK_MACRO_SEP;
|
||||||
use session::{Session, DiagnosticMessageId};
|
use session::{Session, DiagnosticMessageId};
|
||||||
use std::{hash, ptr};
|
use std::{hash, ptr};
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::{MultiSpan, ExpnFormat};
|
use syntax::source_map::{MultiSpan, ExpnFormat};
|
||||||
use syntax::early_buffered_lints::BufferedEarlyLintId;
|
use syntax::early_buffered_lints::BufferedEarlyLintId;
|
||||||
use syntax::edition::Edition;
|
use syntax::edition::Edition;
|
||||||
use syntax::symbol::Symbol;
|
use syntax::symbol::Symbol;
|
||||||
|
|
|
@ -147,7 +147,7 @@ macro_rules! impl_stable_hash_for {
|
||||||
macro_rules! impl_stable_hash_for_spanned {
|
macro_rules! impl_stable_hash_for_spanned {
|
||||||
($T:path) => (
|
($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]
|
#[inline]
|
||||||
fn hash_stable<W: StableHasherResult>(&self,
|
fn hash_stable<W: StableHasherResult>(&self,
|
||||||
|
|
|
@ -24,7 +24,7 @@ use middle::privacy;
|
||||||
use ty::{self, TyCtxt};
|
use ty::{self, TyCtxt};
|
||||||
use util::nodemap::FxHashSet;
|
use util::nodemap::FxHashSet;
|
||||||
|
|
||||||
use syntax::{ast, codemap};
|
use syntax::{ast, source_map};
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax_pos;
|
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,
|
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 {
|
let variant = match self.tables.node_id_to_type(lhs.hir_id).sty {
|
||||||
ty::TyAdt(adt, _) => adt.variant_of_def(def),
|
ty::TyAdt(adt, _) => adt.variant_of_def(def),
|
||||||
_ => span_bug!(lhs.span, "non-ADT in struct pattern")
|
_ => span_bug!(lhs.span, "non-ADT in struct pattern")
|
||||||
|
|
|
@ -23,7 +23,7 @@ use ty;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use rustc_data_structures::sync::Lrc;
|
use rustc_data_structures::sync::Lrc;
|
||||||
use syntax::codemap;
|
use syntax::source_map;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax_pos::{Span, DUMMY_SP};
|
use syntax_pos::{Span, DUMMY_SP};
|
||||||
use ty::TyCtxt;
|
use ty::TyCtxt;
|
||||||
|
@ -943,8 +943,12 @@ fn resolve_expr<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>, expr:
|
||||||
// scopes, meaning that temporaries cannot outlive them.
|
// scopes, meaning that temporaries cannot outlive them.
|
||||||
// This ensures fixed size stacks.
|
// This ensures fixed size stacks.
|
||||||
|
|
||||||
hir::ExprKind::Binary(codemap::Spanned { node: hir::BinOpKind::And, .. }, _, ref r) |
|
hir::ExprKind::Binary(
|
||||||
hir::ExprKind::Binary(codemap::Spanned { node: hir::BinOpKind::Or, .. }, _, ref r) => {
|
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
|
// For shortcircuiting operators, mark the RHS as a terminating
|
||||||
// scope since it only executes conditionally.
|
// scope since it only executes conditionally.
|
||||||
terminating(r.hir_id.local_id);
|
terminating(r.hir_id.local_id);
|
||||||
|
|
|
@ -22,7 +22,7 @@ use lint;
|
||||||
use middle::cstore;
|
use middle::cstore;
|
||||||
|
|
||||||
use syntax::ast::{self, IntTy, UintTy};
|
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::edition::{Edition, EDITION_NAME_LIST, DEFAULT_EDITION};
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
use syntax::parse;
|
use syntax::parse;
|
||||||
|
|
|
@ -35,7 +35,7 @@ use syntax::json::JsonEmitter;
|
||||||
use syntax::feature_gate;
|
use syntax::feature_gate;
|
||||||
use syntax::parse;
|
use syntax::parse;
|
||||||
use syntax::parse::ParseSess;
|
use syntax::parse::ParseSess;
|
||||||
use syntax::{ast, codemap};
|
use syntax::{ast, source_map};
|
||||||
use syntax::feature_gate::AttributeType;
|
use syntax::feature_gate::AttributeType;
|
||||||
use syntax_pos::{MultiSpan, Span};
|
use syntax_pos::{MultiSpan, Span};
|
||||||
use util::profiling::SelfProfiler;
|
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()
|
self.parse_sess.codemap()
|
||||||
}
|
}
|
||||||
pub fn verbose(&self) -> bool {
|
pub fn verbose(&self) -> bool {
|
||||||
|
@ -984,7 +984,7 @@ pub fn build_session(
|
||||||
sopts,
|
sopts,
|
||||||
local_crate_source_file,
|
local_crate_source_file,
|
||||||
registry,
|
registry,
|
||||||
Lrc::new(codemap::SourceMap::new(file_path_mapping)),
|
Lrc::new(source_map::SourceMap::new(file_path_mapping)),
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -993,7 +993,7 @@ pub fn build_session_with_codemap(
|
||||||
sopts: config::Options,
|
sopts: config::Options,
|
||||||
local_crate_source_file: Option<PathBuf>,
|
local_crate_source_file: Option<PathBuf>,
|
||||||
registry: errors::registry::Registry,
|
registry: errors::registry::Registry,
|
||||||
codemap: Lrc<codemap::SourceMap>,
|
codemap: Lrc<source_map::SourceMap>,
|
||||||
emitter_dest: Option<Box<dyn Write + Send>>,
|
emitter_dest: Option<Box<dyn Write + Send>>,
|
||||||
) -> Session {
|
) -> Session {
|
||||||
// FIXME: This is not general enough to make the warning lint completely override
|
// FIXME: This is not general enough to make the warning lint completely override
|
||||||
|
@ -1070,7 +1070,7 @@ pub fn build_session_(
|
||||||
sopts: config::Options,
|
sopts: config::Options,
|
||||||
local_crate_source_file: Option<PathBuf>,
|
local_crate_source_file: Option<PathBuf>,
|
||||||
span_diagnostic: errors::Handler,
|
span_diagnostic: errors::Handler,
|
||||||
codemap: Lrc<codemap::SourceMap>,
|
codemap: Lrc<source_map::SourceMap>,
|
||||||
) -> Session {
|
) -> Session {
|
||||||
let host_triple = TargetTriple::from_triple(config::host_triple());
|
let host_triple = TargetTriple::from_triple(config::host_triple());
|
||||||
let host = match Target::search(&host_triple) {
|
let host = match Target::search(&host_triple) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ use infer::at::At;
|
||||||
use infer::InferOk;
|
use infer::InferOk;
|
||||||
use rustc_data_structures::small_vec::SmallVec;
|
use rustc_data_structures::small_vec::SmallVec;
|
||||||
use std::iter::FromIterator;
|
use std::iter::FromIterator;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use ty::subst::Kind;
|
use ty::subst::Kind;
|
||||||
use ty::{self, Ty, TyCtxt};
|
use ty::{self, Ty, TyCtxt};
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
use infer::InferCtxt;
|
use infer::InferCtxt;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use rustc_data_structures::small_vec::SmallVec;
|
use rustc_data_structures::small_vec::SmallVec;
|
||||||
use traits::{FulfillmentContext, ObligationCause, TraitEngine, TraitEngineExt};
|
use traits::{FulfillmentContext, ObligationCause, TraitEngine, TraitEngineExt};
|
||||||
use traits::query::NoSolution;
|
use traits::query::NoSolution;
|
||||||
|
|
|
@ -15,7 +15,7 @@ use traits::query::Fallible;
|
||||||
use infer::canonical::query_result;
|
use infer::canonical::query_result;
|
||||||
use infer::canonical::QueryRegionConstraint;
|
use infer::canonical::QueryRegionConstraint;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use syntax::codemap::DUMMY_SP;
|
use syntax::source_map::DUMMY_SP;
|
||||||
use traits::{ObligationCause, TraitEngine, TraitEngineExt};
|
use traits::{ObligationCause, TraitEngine, TraitEngineExt};
|
||||||
|
|
||||||
pub struct CustomTypeOp<F, G> {
|
pub struct CustomTypeOp<F, G> {
|
||||||
|
|
|
@ -73,7 +73,7 @@ use std::sync::Arc;
|
||||||
use rustc_target::spec::abi;
|
use rustc_target::spec::abi;
|
||||||
use syntax::ast::{self, NodeId};
|
use syntax::ast::{self, NodeId};
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::MultiSpan;
|
use syntax::source_map::MultiSpan;
|
||||||
use syntax::edition::Edition;
|
use syntax::edition::Edition;
|
||||||
use syntax::feature_gate;
|
use syntax::feature_gate;
|
||||||
use syntax::symbol::{Symbol, keywords, InternedString};
|
use syntax::symbol::{Symbol, keywords, InternedString};
|
||||||
|
|
|
@ -26,7 +26,7 @@ use rustc_serialize::{Decodable, Decoder, Encodable, Encoder, opaque,
|
||||||
use session::{CrateDisambiguator, Session};
|
use session::{CrateDisambiguator, Session};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use syntax::ast::NodeId;
|
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::{BytePos, Span, DUMMY_SP, SourceFile};
|
||||||
use syntax_pos::hygiene::{Mark, SyntaxContext, ExpnInfo};
|
use syntax_pos::hygiene::{Mark, SyntaxContext, ExpnInfo};
|
||||||
use ty;
|
use ty;
|
||||||
|
|
|
@ -32,7 +32,7 @@ use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::collections::hash_map::Entry;
|
use std::collections::hash_map::Entry;
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
use syntax::codemap::DUMMY_SP;
|
use syntax::source_map::DUMMY_SP;
|
||||||
|
|
||||||
pub struct QueryCache<'tcx, D: QueryConfig<'tcx> + ?Sized> {
|
pub struct QueryCache<'tcx, D: QueryConfig<'tcx> + ?Sized> {
|
||||||
pub(super) results: FxHashMap<D::Key, QueryValue<D::Value>>,
|
pub(super) results: FxHashMap<D::Key, QueryValue<D::Value>>,
|
||||||
|
|
|
@ -17,7 +17,7 @@ use syntax::{
|
||||||
Mac, Mod, Mutability, Ty, TyKind, Unsafety, VisibilityKind,
|
Mac, Mod, Mutability, Ty, TyKind, Unsafety, VisibilityKind,
|
||||||
},
|
},
|
||||||
attr,
|
attr,
|
||||||
codemap::{
|
source_map::{
|
||||||
respan, ExpnInfo, MacroAttribute,
|
respan, ExpnInfo, MacroAttribute,
|
||||||
},
|
},
|
||||||
ext::{
|
ext::{
|
||||||
|
|
|
@ -25,7 +25,7 @@ use consts;
|
||||||
use type_of::LayoutLlvmExt;
|
use type_of::LayoutLlvmExt;
|
||||||
use type_::Type;
|
use type_::Type;
|
||||||
use syntax::ast::Mutability;
|
use syntax::ast::Mutability;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use value::Value;
|
use value::Value;
|
||||||
|
|
||||||
use super::super::callee;
|
use super::super::callee;
|
||||||
|
|
|
@ -107,7 +107,7 @@ use std::sync::{Once, ONCE_INIT};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::{SourceMap, FileLoader, RealFileLoader};
|
use syntax::source_map::{SourceMap, FileLoader, RealFileLoader};
|
||||||
use syntax::feature_gate::{GatedCfg, UnstableFeatures};
|
use syntax::feature_gate::{GatedCfg, UnstableFeatures};
|
||||||
use syntax::parse::{self, PResult};
|
use syntax::parse::{self, PResult};
|
||||||
use syntax_pos::{DUMMY_SP, MultiSpan, FileName};
|
use syntax_pos::{DUMMY_SP, MultiSpan, FileName};
|
||||||
|
|
|
@ -32,7 +32,7 @@ use rustc_data_structures::sync::{self, Lrc};
|
||||||
use syntax;
|
use syntax;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use syntax::codemap::{SourceMap, FilePathMapping, FileName};
|
use syntax::source_map::{SourceMap, FilePathMapping, FileName};
|
||||||
use errors;
|
use errors;
|
||||||
use errors::emitter::Emitter;
|
use errors::emitter::Emitter;
|
||||||
use errors::{Level, DiagnosticBuilder};
|
use errors::{Level, DiagnosticBuilder};
|
||||||
|
|
|
@ -45,7 +45,7 @@ use rustc::util::nodemap::FxHashSet;
|
||||||
use syntax::tokenstream::{TokenTree, TokenStream};
|
use syntax::tokenstream::{TokenTree, TokenStream};
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::Spanned;
|
use syntax::source_map::Spanned;
|
||||||
use syntax::edition::Edition;
|
use syntax::edition::Edition;
|
||||||
use syntax::feature_gate::{AttributeGate, AttributeType, Stability, deprecated_attributes};
|
use syntax::feature_gate::{AttributeGate, AttributeType, Stability, deprecated_attributes};
|
||||||
use syntax_pos::{BytePos, Span, SyntaxContext};
|
use syntax_pos::{BytePos, Span, SyntaxContext};
|
||||||
|
|
|
@ -25,7 +25,7 @@ use syntax::{ast, attr};
|
||||||
use syntax::errors::Applicability;
|
use syntax::errors::Applicability;
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
use syntax::codemap;
|
use syntax::source_map;
|
||||||
|
|
||||||
use rustc::hir;
|
use rustc::hir;
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rev_binop(binop: hir::BinOp) -> hir::BinOp {
|
fn rev_binop(binop: hir::BinOp) -> hir::BinOp {
|
||||||
codemap::respan(binop.span,
|
source_map::respan(binop.span,
|
||||||
match binop.node {
|
match binop.node {
|
||||||
hir::BinOpKind::Lt => hir::BinOpKind::Gt,
|
hir::BinOpKind::Lt => hir::BinOpKind::Gt,
|
||||||
hir::BinOpKind::Le => hir::BinOpKind::Ge,
|
hir::BinOpKind::Le => hir::BinOpKind::Ge,
|
||||||
|
|
|
@ -38,7 +38,7 @@ use std::sync::Arc;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap;
|
use syntax::source_map;
|
||||||
use syntax::edition::Edition;
|
use syntax::edition::Edition;
|
||||||
use syntax::parse::source_file_to_stream;
|
use syntax::parse::source_file_to_stream;
|
||||||
use syntax::symbol::Symbol;
|
use syntax::symbol::Symbol;
|
||||||
|
@ -487,7 +487,7 @@ impl cstore::CStore {
|
||||||
tokens: body.into(),
|
tokens: body.into(),
|
||||||
legacy: def.legacy,
|
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,
|
tokens: None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ use std::u32;
|
||||||
use rustc_serialize::{Decodable, Decoder, SpecializedDecoder, opaque};
|
use rustc_serialize::{Decodable, Decoder, SpecializedDecoder, opaque};
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::ast::{self, Ident};
|
use syntax::ast::{self, Ident};
|
||||||
use syntax::codemap;
|
use syntax::source_map;
|
||||||
use syntax::symbol::InternedString;
|
use syntax::symbol::InternedString;
|
||||||
use syntax::ext::base::MacroKind;
|
use syntax::ext::base::MacroKind;
|
||||||
use syntax_pos::{self, Span, BytePos, Pos, DUMMY_SP, NO_EXPANSION};
|
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
|
/// multibyte characters. This information is enough to generate valid debuginfo
|
||||||
/// for items inlined from other crates.
|
/// for items inlined from other crates.
|
||||||
pub fn imported_source_files(&'a self,
|
pub fn imported_source_files(&'a self,
|
||||||
local_codemap: &codemap::SourceMap)
|
local_codemap: &source_map::SourceMap)
|
||||||
-> ReadGuard<'a, Vec<cstore::ImportedSourceFile>> {
|
-> ReadGuard<'a, Vec<cstore::ImportedSourceFile>> {
|
||||||
{
|
{
|
||||||
let source_files = self.codemap_import_info.borrow();
|
let source_files = self.codemap_import_info.borrow();
|
||||||
|
|
|
@ -40,7 +40,7 @@ use rustc_data_structures::sync::Lrc;
|
||||||
use std::u32;
|
use std::u32;
|
||||||
use syntax::ast::{self, CRATE_NODE_ID};
|
use syntax::ast::{self, CRATE_NODE_ID};
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::Spanned;
|
use syntax::source_map::Spanned;
|
||||||
use syntax::symbol::keywords;
|
use syntax::symbol::keywords;
|
||||||
use syntax_pos::{self, hygiene, FileName, SourceFile, Span};
|
use syntax_pos::{self, hygiene, FileName, SourceFile, Span};
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ use rustc::ty::TyCtxt;
|
||||||
use rustc::util::nodemap::FxHashSet;
|
use rustc::util::nodemap::FxHashSet;
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use syntax::feature_gate::{self, GateIssue};
|
use syntax::feature_gate::{self, GateIssue};
|
||||||
use syntax::symbol::Symbol;
|
use syntax::symbol::Symbol;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ use borrow_check::nll::ToRegionVid;
|
||||||
use rustc::mir::{Local, Mir};
|
use rustc::mir::{Local, Mir};
|
||||||
use rustc::ty::{RegionVid, TyCtxt};
|
use rustc::ty::{RegionVid, TyCtxt};
|
||||||
use rustc_data_structures::indexed_vec::Idx;
|
use rustc_data_structures::indexed_vec::Idx;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use syntax_pos::symbol::Symbol;
|
use syntax_pos::symbol::Symbol;
|
||||||
|
|
||||||
impl<'tcx> RegionInferenceContext<'tcx> {
|
impl<'tcx> RegionInferenceContext<'tcx> {
|
||||||
|
|
|
@ -10,8 +10,8 @@ use rustc::ty::subst::Subst;
|
||||||
use rustc_data_structures::indexed_vec::IndexVec;
|
use rustc_data_structures::indexed_vec::IndexVec;
|
||||||
|
|
||||||
use syntax::ast::Mutability;
|
use syntax::ast::Mutability;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use syntax::codemap::DUMMY_SP;
|
use syntax::source_map::DUMMY_SP;
|
||||||
|
|
||||||
use rustc::mir::interpret::{
|
use rustc::mir::interpret::{
|
||||||
EvalResult, EvalError, EvalErrorKind, GlobalId,
|
EvalResult, EvalError, EvalErrorKind, GlobalId,
|
||||||
|
|
|
@ -18,7 +18,7 @@ use rustc::mir::interpret::{
|
||||||
ScalarMaybeUndef,
|
ScalarMaybeUndef,
|
||||||
};
|
};
|
||||||
|
|
||||||
use syntax::codemap::{self, Span};
|
use syntax::source_map::{self, Span};
|
||||||
use syntax::ast::Mutability;
|
use syntax::ast::Mutability;
|
||||||
|
|
||||||
use super::{Place, PlaceExtra, Memory,
|
use super::{Place, PlaceExtra, Memory,
|
||||||
|
@ -91,7 +91,7 @@ pub struct Frame<'mir, 'tcx: 'mir> {
|
||||||
pub instance: ty::Instance<'tcx>,
|
pub instance: ty::Instance<'tcx>,
|
||||||
|
|
||||||
/// The span of the call site.
|
/// The span of the call site.
|
||||||
pub span: codemap::Span,
|
pub span: source_map::Span,
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Return place and locals
|
// 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(
|
pub fn push_stack_frame(
|
||||||
&mut self,
|
&mut self,
|
||||||
instance: ty::Instance<'tcx>,
|
instance: ty::Instance<'tcx>,
|
||||||
span: codemap::Span,
|
span: source_map::Span,
|
||||||
mir: &'mir mir::Mir<'tcx>,
|
mir: &'mir mir::Mir<'tcx>,
|
||||||
return_place: Place,
|
return_place: Place,
|
||||||
return_to_block: StackPopCleanup,
|
return_to_block: StackPopCleanup,
|
||||||
|
|
|
@ -10,7 +10,7 @@ use super::{EvalContext, Place, ValTy, Memory};
|
||||||
use rustc::mir;
|
use rustc::mir;
|
||||||
use rustc::ty::{self, Ty};
|
use rustc::ty::{self, Ty};
|
||||||
use rustc::ty::layout::Size;
|
use rustc::ty::layout::Size;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use syntax::ast::Mutability;
|
use syntax::ast::Mutability;
|
||||||
|
|
||||||
/// Methods of this trait signifies a point where CTFE evaluation would fail
|
/// Methods of this trait signifies a point where CTFE evaluation would fail
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use rustc::mir::BasicBlock;
|
use rustc::mir::BasicBlock;
|
||||||
use rustc::ty::{self, Ty};
|
use rustc::ty::{self, Ty};
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
|
|
||||||
use rustc::mir::interpret::{EvalResult, Value};
|
use rustc::mir::interpret::{EvalResult, Value};
|
||||||
use interpret::{Machine, ValTy, EvalContext, Place, PlaceExtra};
|
use interpret::{Machine, ValTy, EvalContext, Place, PlaceExtra};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use rustc::mir;
|
use rustc::mir;
|
||||||
use rustc::ty::{self, Ty};
|
use rustc::ty::{self, Ty};
|
||||||
use rustc::ty::layout::{LayoutOf, Size};
|
use rustc::ty::layout::{LayoutOf, Size};
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
|
|
||||||
use rustc::mir::interpret::{EvalResult, Scalar, Value};
|
use rustc::mir::interpret::{EvalResult, Scalar, Value};
|
||||||
|
|
|
@ -26,7 +26,7 @@ use std::fmt::{self, Write};
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use rustc::mir::mono::Linkage;
|
use rustc::mir::mono::Linkage;
|
||||||
use syntax_pos::symbol::Symbol;
|
use syntax_pos::symbol::Symbol;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
pub use rustc::mir::mono::MonoItem;
|
pub use rustc::mir::mono::MonoItem;
|
||||||
|
|
||||||
/// Describes how a monomorphization will be instantiated in object files.
|
/// Describes how a monomorphization will be instantiated in object files.
|
||||||
|
|
|
@ -24,7 +24,7 @@ use interpret::EvalContext;
|
||||||
use interpret::CompileTimeEvaluator;
|
use interpret::CompileTimeEvaluator;
|
||||||
use interpret::{eval_promoted, mk_borrowck_eval_cx, ValTy};
|
use interpret::{eval_promoted, mk_borrowck_eval_cx, ValTy};
|
||||||
use transform::{MirPass, MirSource};
|
use transform::{MirPass, MirSource};
|
||||||
use syntax::codemap::{Span, DUMMY_SP};
|
use syntax::source_map::{Span, DUMMY_SP};
|
||||||
use rustc::ty::subst::Substs;
|
use rustc::ty::subst::Substs;
|
||||||
use rustc_data_structures::indexed_vec::IndexVec;
|
use rustc_data_structures::indexed_vec::IndexVec;
|
||||||
use rustc::ty::ParamEnv;
|
use rustc::ty::ParamEnv;
|
||||||
|
|
|
@ -20,7 +20,7 @@ use rustc::lint;
|
||||||
use rustc::session::Session;
|
use rustc::session::Session;
|
||||||
use syntax::ast::*;
|
use syntax::ast::*;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::Spanned;
|
use syntax::source_map::Spanned;
|
||||||
use syntax::symbol::keywords;
|
use syntax::symbol::keywords;
|
||||||
use syntax::visit::{self, Visitor};
|
use syntax::visit::{self, Visitor};
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
|
|
|
@ -49,7 +49,7 @@ use rustc::util::nodemap::{NodeMap, NodeSet, FxHashMap, FxHashSet, DefIdMap};
|
||||||
use rustc_metadata::creader::CrateLoader;
|
use rustc_metadata::creader::CrateLoader;
|
||||||
use rustc_metadata::cstore::CStore;
|
use rustc_metadata::cstore::CStore;
|
||||||
|
|
||||||
use syntax::codemap::SourceMap;
|
use syntax::source_map::SourceMap;
|
||||||
use syntax::ext::hygiene::{Mark, Transparency, SyntaxContext};
|
use syntax::ext::hygiene::{Mark, Transparency, SyntaxContext};
|
||||||
use syntax::ast::{self, Name, NodeId, Ident, FloatTy, IntTy, UintTy};
|
use syntax::ast::{self, Name, NodeId, Ident, FloatTy, IntTy, UintTy};
|
||||||
use syntax::ext::base::SyntaxExtension;
|
use syntax::ext::base::SyntaxExtension;
|
||||||
|
|
|
@ -41,7 +41,7 @@ use syntax::print::pprust::{
|
||||||
ty_to_string
|
ty_to_string
|
||||||
};
|
};
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax::codemap::{Spanned, DUMMY_SP, respan};
|
use syntax::source_map::{Spanned, DUMMY_SP, respan};
|
||||||
use syntax_pos::*;
|
use syntax_pos::*;
|
||||||
|
|
||||||
use {escape, generated_code, lower_attributes, PathCollector, SaveContext};
|
use {escape, generated_code, lower_attributes, PathCollector, SaveContext};
|
||||||
|
|
|
@ -56,14 +56,14 @@ use std::fs::File;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use syntax::ast::{self, Attribute, NodeId, PatKind};
|
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::lexer::comments::strip_doc_comment_decoration;
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
use syntax::print::pprust;
|
use syntax::print::pprust;
|
||||||
use syntax::symbol::keywords;
|
use syntax::symbol::keywords;
|
||||||
use syntax::visit::{self, Visitor};
|
use syntax::visit::{self, Visitor};
|
||||||
use syntax::print::pprust::{arg_to_string, ty_to_string};
|
use syntax::print::pprust::{arg_to_string, ty_to_string};
|
||||||
use syntax::codemap::MacroAttribute;
|
use syntax::source_map::MacroAttribute;
|
||||||
use syntax_pos::*;
|
use syntax_pos::*;
|
||||||
|
|
||||||
use json_dumper::JsonDumper;
|
use json_dumper::JsonDumper;
|
||||||
|
|
|
@ -18,7 +18,7 @@ use rustc::ty::subst::{Subst, Substs};
|
||||||
use rustc::ty::{self, ParamEnvAnd, Ty, TyCtxt};
|
use rustc::ty::{self, ParamEnvAnd, Ty, TyCtxt};
|
||||||
use rustc::util::nodemap::FxHashSet;
|
use rustc::util::nodemap::FxHashSet;
|
||||||
use rustc_data_structures::sync::Lrc;
|
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) {
|
crate fn provide(p: &mut Providers) {
|
||||||
*p = Providers {
|
*p = Providers {
|
||||||
|
|
|
@ -13,7 +13,7 @@ use rustc::traits::{EvaluationResult, Obligation, ObligationCause,
|
||||||
use rustc::traits::query::CanonicalPredicateGoal;
|
use rustc::traits::query::CanonicalPredicateGoal;
|
||||||
use rustc::ty::query::Providers;
|
use rustc::ty::query::Providers;
|
||||||
use rustc::ty::{ParamEnvAnd, TyCtxt};
|
use rustc::ty::{ParamEnvAnd, TyCtxt};
|
||||||
use syntax::codemap::DUMMY_SP;
|
use syntax::source_map::DUMMY_SP;
|
||||||
|
|
||||||
crate fn provide(p: &mut Providers) {
|
crate fn provide(p: &mut Providers) {
|
||||||
*p = Providers {
|
*p = Providers {
|
||||||
|
|
|
@ -21,7 +21,7 @@ use rustc::ty::outlives::Component;
|
||||||
use rustc::ty::query::Providers;
|
use rustc::ty::query::Providers;
|
||||||
use rustc::ty::wf;
|
use rustc::ty::wf;
|
||||||
use syntax::ast::DUMMY_NODE_ID;
|
use syntax::ast::DUMMY_NODE_ID;
|
||||||
use syntax::codemap::DUMMY_SP;
|
use syntax::source_map::DUMMY_SP;
|
||||||
use rustc::traits::FulfillmentContext;
|
use rustc::traits::FulfillmentContext;
|
||||||
|
|
||||||
use rustc_data_structures::sync::Lrc;
|
use rustc_data_structures::sync::Lrc;
|
||||||
|
|
|
@ -22,7 +22,7 @@ use util::nodemap::FxHashMap;
|
||||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::Spanned;
|
use syntax::source_map::Spanned;
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ use rustc::ty::subst::Substs;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use rustc::hir;
|
use rustc::hir;
|
||||||
|
|
||||||
/// What signature do we *expect* the closure to have from context?
|
/// What signature do we *expect* the closure to have from context?
|
||||||
|
|
|
@ -122,7 +122,7 @@ use std::ops::{self, Deref};
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::original_sp;
|
use syntax::source_map::original_sp;
|
||||||
use syntax::feature_gate::{GateIssue, emit_feature_err};
|
use syntax::feature_gate::{GateIssue, emit_feature_err};
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax::symbol::{Symbol, LocalInternedString, keywords};
|
use syntax::symbol::{Symbol, LocalInternedString, keywords};
|
||||||
|
|
|
@ -43,7 +43,7 @@ use rustc_target::spec::abi;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::ast::MetaItemKind;
|
use syntax::ast::MetaItemKind;
|
||||||
use syntax::attr::{InlineAttr, list_contains_name, mark_used};
|
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::symbol::{Symbol, keywords};
|
||||||
use syntax::feature_gate;
|
use syntax::feature_gate;
|
||||||
use syntax_pos::{Span, DUMMY_SP};
|
use syntax_pos::{Span, DUMMY_SP};
|
||||||
|
|
|
@ -417,7 +417,7 @@ mod test {
|
||||||
|
|
||||||
use syntax::symbol::Symbol;
|
use syntax::symbol::Symbol;
|
||||||
use syntax::ast::*;
|
use syntax::ast::*;
|
||||||
use syntax::codemap::dummy_spanned;
|
use syntax::source_map::dummy_spanned;
|
||||||
use syntax_pos::DUMMY_SP;
|
use syntax_pos::DUMMY_SP;
|
||||||
use syntax::with_globals;
|
use syntax::with_globals;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ pub use self::Visibility::{Public, Inherited};
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use syntax::ast::{self, AttrStyle, Ident};
|
use syntax::ast::{self, AttrStyle, Ident};
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::{dummy_spanned, Spanned};
|
use syntax::source_map::{dummy_spanned, Spanned};
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax::symbol::keywords::{self, Keyword};
|
use syntax::symbol::keywords::{self, Keyword};
|
||||||
use syntax::symbol::InternedString;
|
use syntax::symbol::InternedString;
|
||||||
|
|
|
@ -27,7 +27,7 @@ use rustc_metadata::cstore::CStore;
|
||||||
use rustc_target::spec::TargetTriple;
|
use rustc_target::spec::TargetTriple;
|
||||||
|
|
||||||
use syntax::ast::{self, Ident};
|
use syntax::ast::{self, Ident};
|
||||||
use syntax::codemap;
|
use syntax::source_map;
|
||||||
use syntax::edition::Edition;
|
use syntax::edition::Edition;
|
||||||
use syntax::feature_gate::UnstableFeatures;
|
use syntax::feature_gate::UnstableFeatures;
|
||||||
use syntax::json::JsonEmitter;
|
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
|
/// If the given `error_format` is `ErrorOutputType::Json` and no `SourceMap` is given, a new one
|
||||||
/// will be created for the handler.
|
/// 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
|
-> errors::Handler
|
||||||
{
|
{
|
||||||
// rustdoc doesn't override (or allow to override) anything from this that is relevant here, so
|
// 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) => {
|
ErrorOutputType::Json(pretty) => {
|
||||||
let codemap = codemap.unwrap_or_else(
|
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(
|
Box::new(
|
||||||
JsonEmitter::stderr(
|
JsonEmitter::stderr(
|
||||||
None,
|
None,
|
||||||
|
@ -387,7 +387,7 @@ pub fn run_core(search_paths: SearchPaths,
|
||||||
..Options::default()
|
..Options::default()
|
||||||
};
|
};
|
||||||
driver::spawn_thread_pool(sessopts, move |sessopts| {
|
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 diagnostic_handler = new_handler(error_format, Some(codemap.clone()));
|
||||||
|
|
||||||
let mut sess = session::build_session_(
|
let mut sess = session::build_session_(
|
||||||
|
|
|
@ -16,7 +16,7 @@ use syntax::ast;
|
||||||
use syntax::ast::{Name, NodeId};
|
use syntax::ast::{Name, NodeId};
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax::codemap::Spanned;
|
use syntax::source_map::Spanned;
|
||||||
use syntax_pos::{self, Span};
|
use syntax_pos::{self, Span};
|
||||||
|
|
||||||
use rustc::hir;
|
use rustc::hir;
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::fmt::Display;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
|
|
||||||
use syntax::codemap::{SourceMap, FilePathMapping};
|
use syntax::source_map::{SourceMap, FilePathMapping};
|
||||||
use syntax::parse::lexer::{self, TokenAndSpan};
|
use syntax::parse::lexer::{self, TokenAndSpan};
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
use syntax::parse;
|
use syntax::parse;
|
||||||
|
|
|
@ -56,7 +56,7 @@ use externalfiles::ExternalHtml;
|
||||||
|
|
||||||
use serialize::json::{ToJson, Json, as_json};
|
use serialize::json::{ToJson, Json, as_json};
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::FileName;
|
use syntax::source_map::FileName;
|
||||||
use syntax::feature_gate::UnstableFeatures;
|
use syntax::feature_gate::UnstableFeatures;
|
||||||
use rustc::hir::def_id::{CrateNum, CRATE_DEF_INDEX, DefId};
|
use rustc::hir::def_id::{CrateNum, CRATE_DEF_INDEX, DefId};
|
||||||
use rustc::middle::privacy::AccessLevels;
|
use rustc::middle::privacy::AccessLevels;
|
||||||
|
|
|
@ -19,7 +19,7 @@ use getopts;
|
||||||
use testing;
|
use testing;
|
||||||
use rustc::session::search_paths::SearchPaths;
|
use rustc::session::search_paths::SearchPaths;
|
||||||
use rustc::session::config::{Externs, CodegenOptions};
|
use rustc::session::config::{Externs, CodegenOptions};
|
||||||
use syntax::codemap::DUMMY_SP;
|
use syntax::source_map::DUMMY_SP;
|
||||||
use syntax::feature_gate::UnstableFeatures;
|
use syntax::feature_gate::UnstableFeatures;
|
||||||
use syntax::edition::Edition;
|
use syntax::edition::Edition;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ use rustc_driver::driver::phase_2_configure_and_expand;
|
||||||
use rustc_metadata::cstore::CStore;
|
use rustc_metadata::cstore::CStore;
|
||||||
use rustc_resolve::MakeGlobMap;
|
use rustc_resolve::MakeGlobMap;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::SourceMap;
|
use syntax::source_map::SourceMap;
|
||||||
use syntax::edition::Edition;
|
use syntax::edition::Edition;
|
||||||
use syntax::feature_gate::UnstableFeatures;
|
use syntax::feature_gate::UnstableFeatures;
|
||||||
use syntax::with_globals;
|
use syntax::with_globals;
|
||||||
|
|
|
@ -15,7 +15,7 @@ use std::mem;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::Spanned;
|
use syntax::source_map::Spanned;
|
||||||
use syntax_pos::{self, Span};
|
use syntax_pos::{self, Span};
|
||||||
|
|
||||||
use rustc::hir::map as hir_map;
|
use rustc::hir::map as hir_map;
|
||||||
|
|
|
@ -16,7 +16,7 @@ pub use symbol::{Ident, Symbol as Name};
|
||||||
pub use util::parser::ExprPrecedence;
|
pub use util::parser::ExprPrecedence;
|
||||||
|
|
||||||
use syntax_pos::{Span, DUMMY_SP};
|
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 rustc_target::spec::abi::Abi;
|
||||||
use ext::hygiene::{Mark, SyntaxContext};
|
use ext::hygiene::{Mark, SyntaxContext};
|
||||||
use print::pprust;
|
use print::pprust;
|
||||||
|
|
|
@ -25,7 +25,7 @@ use ast;
|
||||||
use ast::{AttrId, Attribute, AttrStyle, Name, Ident, Path, PathSegment};
|
use ast::{AttrId, Attribute, AttrStyle, Name, Ident, Path, PathSegment};
|
||||||
use ast::{MetaItem, MetaItemKind, NestedMetaItem, NestedMetaItemKind};
|
use ast::{MetaItem, MetaItemKind, NestedMetaItem, NestedMetaItemKind};
|
||||||
use ast::{Lit, LitKind, Expr, ExprKind, Item, Local, Stmt, StmtKind, GenericParam};
|
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 syntax_pos::{FileName, Span};
|
||||||
use parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration};
|
use parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration};
|
||||||
use parse::parser::Parser;
|
use parse::parser::Parser;
|
||||||
|
|
|
@ -12,7 +12,7 @@ use attr::HasAttrs;
|
||||||
use feature_gate::{feature_err, EXPLAIN_STMT_ATTR_SYNTAX, Features, get_features, GateIssue};
|
use feature_gate::{feature_err, EXPLAIN_STMT_ATTR_SYNTAX, Features, get_features, GateIssue};
|
||||||
use {fold, attr};
|
use {fold, attr};
|
||||||
use ast;
|
use ast;
|
||||||
use codemap::Spanned;
|
use source_map::Spanned;
|
||||||
use edition::Edition;
|
use edition::Edition;
|
||||||
use parse::{token, ParseSess};
|
use parse::{token, ParseSess};
|
||||||
use OneVector;
|
use OneVector;
|
||||||
|
|
|
@ -13,7 +13,7 @@ use std::env;
|
||||||
|
|
||||||
use ast;
|
use ast;
|
||||||
use ast::{Ident, Name};
|
use ast::{Ident, Name};
|
||||||
use codemap;
|
use source_map;
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
use ext::base::{ExtCtxt, MacEager, MacResult};
|
use ext::base::{ExtCtxt, MacEager, MacResult};
|
||||||
use ext::build::AstBuilder;
|
use ext::build::AstBuilder;
|
||||||
|
@ -223,7 +223,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt,
|
||||||
ty,
|
ty,
|
||||||
expr,
|
expr,
|
||||||
),
|
),
|
||||||
vis: codemap::respan(span.shrink_to_lo(), ast::VisibilityKind::Public),
|
vis: source_map::respan(span.shrink_to_lo(), ast::VisibilityKind::Public),
|
||||||
span,
|
span,
|
||||||
tokens: None,
|
tokens: None,
|
||||||
})
|
})
|
||||||
|
|
|
@ -12,7 +12,7 @@ pub use self::SyntaxExtension::*;
|
||||||
|
|
||||||
use ast::{self, Attribute, Name, PatKind, MetaItem};
|
use ast::{self, Attribute, Name, PatKind, MetaItem};
|
||||||
use attr::HasAttrs;
|
use attr::HasAttrs;
|
||||||
use codemap::{self, SourceMap, Spanned, respan};
|
use source_map::{self, SourceMap, Spanned, respan};
|
||||||
use syntax_pos::{Span, MultiSpan, DUMMY_SP};
|
use syntax_pos::{Span, MultiSpan, DUMMY_SP};
|
||||||
use edition::Edition;
|
use edition::Edition;
|
||||||
use errors::{DiagnosticBuilder, DiagnosticId};
|
use errors::{DiagnosticBuilder, DiagnosticId};
|
||||||
|
@ -481,7 +481,7 @@ impl DummyResult {
|
||||||
pub fn raw_expr(sp: Span) -> P<ast::Expr> {
|
pub fn raw_expr(sp: Span) -> P<ast::Expr> {
|
||||||
P(ast::Expr {
|
P(ast::Expr {
|
||||||
id: ast::DUMMY_NODE_ID,
|
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,
|
span: sp,
|
||||||
attrs: ThinVec::new(),
|
attrs: ThinVec::new(),
|
||||||
})
|
})
|
||||||
|
|
|
@ -12,7 +12,7 @@ use rustc_target::spec::abi::Abi;
|
||||||
use ast::{self, Ident, Generics, Expr, BlockCheckMode, UnOp, PatKind};
|
use ast::{self, Ident, Generics, Expr, BlockCheckMode, UnOp, PatKind};
|
||||||
use attr;
|
use attr;
|
||||||
use syntax_pos::{Pos, Span, DUMMY_SP};
|
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 ext::base::ExtCtxt;
|
||||||
use ptr::P;
|
use ptr::P;
|
||||||
use symbol::{Symbol, keywords};
|
use symbol::{Symbol, keywords};
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
use attr::HasAttrs;
|
use attr::HasAttrs;
|
||||||
use ast;
|
use ast;
|
||||||
use codemap::{hygiene, ExpnInfo, ExpnFormat};
|
use source_map::{hygiene, ExpnInfo, ExpnFormat};
|
||||||
use ext::base::ExtCtxt;
|
use ext::base::ExtCtxt;
|
||||||
use ext::build::AstBuilder;
|
use ext::build::AstBuilder;
|
||||||
use parse::parser::PathStyle;
|
use parse::parser::PathStyle;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
use ast::{self, Block, Ident, NodeId, PatKind, Path};
|
use ast::{self, Block, Ident, NodeId, PatKind, Path};
|
||||||
use ast::{MacStmtStyle, StmtKind, ItemKind};
|
use ast::{MacStmtStyle, StmtKind, ItemKind};
|
||||||
use attr::{self, HasAttrs};
|
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 config::{is_test_or_bench, StripUnconfigured};
|
||||||
use errors::{Applicability, FatalError};
|
use errors::{Applicability, FatalError};
|
||||||
use ext::base::*;
|
use ext::base::*;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use ast::{self, NodeId};
|
use ast::{self, NodeId};
|
||||||
use codemap::{DUMMY_SP, dummy_spanned};
|
use source_map::{DUMMY_SP, dummy_spanned};
|
||||||
use ext::base::ExtCtxt;
|
use ext::base::ExtCtxt;
|
||||||
use ext::expand::{AstFragment, AstFragmentKind};
|
use ext::expand::{AstFragment, AstFragmentKind};
|
||||||
use ext::hygiene::Mark;
|
use ext::hygiene::Mark;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use ast::{self, Arg, Arm, Block, Expr, Item, Pat, Stmt, Ty};
|
use ast::{self, Arg, Arm, Block, Expr, Item, Pat, Stmt, Ty};
|
||||||
use codemap::respan;
|
use source_map::respan;
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
use ext::base::ExtCtxt;
|
use ext::base::ExtCtxt;
|
||||||
use ext::base;
|
use ext::base;
|
||||||
|
@ -28,7 +28,7 @@ use tokenstream::{TokenStream, TokenTree};
|
||||||
|
|
||||||
pub mod rt {
|
pub mod rt {
|
||||||
use ast;
|
use ast;
|
||||||
use codemap::Spanned;
|
use source_map::Spanned;
|
||||||
use ext::base::ExtCtxt;
|
use ext::base::ExtCtxt;
|
||||||
use parse::{self, classify};
|
use parse::{self, classify};
|
||||||
use parse::token::{self, Token};
|
use parse::token::{self, Token};
|
||||||
|
@ -40,7 +40,7 @@ pub mod rt {
|
||||||
|
|
||||||
pub use parse::new_parser_from_tts;
|
pub use parse::new_parser_from_tts;
|
||||||
pub use syntax_pos::{BytePos, Span, DUMMY_SP, FileName};
|
pub use syntax_pos::{BytePos, Span, DUMMY_SP, FileName};
|
||||||
pub use codemap::{dummy_spanned};
|
pub use source_map::{dummy_spanned};
|
||||||
|
|
||||||
pub trait ToTokens {
|
pub trait ToTokens {
|
||||||
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree>;
|
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree>;
|
||||||
|
|
|
@ -29,7 +29,7 @@ use rustc_data_structures::fx::FxHashMap;
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use ast::{self, NodeId, PatKind, RangeEnd};
|
use ast::{self, NodeId, PatKind, RangeEnd};
|
||||||
use attr;
|
use attr;
|
||||||
use codemap::Spanned;
|
use source_map::Spanned;
|
||||||
use edition::{ALL_EDITIONS, Edition};
|
use edition::{ALL_EDITIONS, Edition};
|
||||||
use syntax_pos::{Span, DUMMY_SP};
|
use syntax_pos::{Span, DUMMY_SP};
|
||||||
use errors::{DiagnosticBuilder, Handler};
|
use errors::{DiagnosticBuilder, Handler};
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
use ast::*;
|
use ast::*;
|
||||||
use ast;
|
use ast;
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
use codemap::{Spanned, respan};
|
use source_map::{Spanned, respan};
|
||||||
use parse::token::{self, Token};
|
use parse::token::{self, Token};
|
||||||
use ptr::P;
|
use ptr::P;
|
||||||
use OneVector;
|
use OneVector;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
// FIXME spec the JSON output properly.
|
// FIXME spec the JSON output properly.
|
||||||
|
|
||||||
use codemap::{SourceMap, FilePathMapping};
|
use source_map::{SourceMap, FilePathMapping};
|
||||||
use syntax_pos::{self, MacroBacktrace, Span, SpanLabel, MultiSpan};
|
use syntax_pos::{self, MacroBacktrace, Span, SpanLabel, MultiSpan};
|
||||||
use errors::registry::Registry;
|
use errors::registry::Registry;
|
||||||
use errors::{DiagnosticBuilder, SubDiagnostic, CodeSuggestion, SourceMapper};
|
use errors::{DiagnosticBuilder, SubDiagnostic, CodeSuggestion, SourceMapper};
|
||||||
|
|
|
@ -145,7 +145,7 @@ pub mod syntax {
|
||||||
|
|
||||||
pub mod ast;
|
pub mod ast;
|
||||||
pub mod attr;
|
pub mod attr;
|
||||||
pub mod codemap;
|
pub mod source_map;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
pub mod config;
|
pub mod config;
|
||||||
pub mod entry;
|
pub mod entry;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
use attr;
|
use attr;
|
||||||
use ast;
|
use ast;
|
||||||
use codemap::respan;
|
use source_map::respan;
|
||||||
use parse::{SeqSep, PResult};
|
use parse::{SeqSep, PResult};
|
||||||
use parse::token::{self, Nonterminal, DelimToken};
|
use parse::token::{self, Nonterminal, DelimToken};
|
||||||
use parse::parser::{Parser, TokenType, PathStyle};
|
use parse::parser::{Parser, TokenType, PathStyle};
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
pub use self::CommentStyle::*;
|
pub use self::CommentStyle::*;
|
||||||
|
|
||||||
use ast;
|
use ast;
|
||||||
use codemap::SourceMap;
|
use source_map::SourceMap;
|
||||||
use syntax_pos::{BytePos, CharPos, Pos, FileName};
|
use syntax_pos::{BytePos, CharPos, Pos, FileName};
|
||||||
use parse::lexer::{is_block_doc_comment, is_pattern_whitespace};
|
use parse::lexer::{is_block_doc_comment, is_pattern_whitespace};
|
||||||
use parse::lexer::{self, ParseSess, StringReader, TokenAndSpan};
|
use parse::lexer::{self, ParseSess, StringReader, TokenAndSpan};
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
use ast::{self, Ident};
|
use ast::{self, Ident};
|
||||||
use syntax_pos::{self, BytePos, CharPos, Pos, Span, NO_EXPANSION};
|
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 errors::{Applicability, FatalError, DiagnosticBuilder};
|
||||||
use parse::{token, ParseSess};
|
use parse::{token, ParseSess};
|
||||||
use str::char_at;
|
use str::char_at;
|
||||||
|
@ -1827,7 +1827,7 @@ mod tests {
|
||||||
use ast::{Ident, CrateConfig};
|
use ast::{Ident, CrateConfig};
|
||||||
use symbol::Symbol;
|
use symbol::Symbol;
|
||||||
use syntax_pos::{BytePos, Span, NO_EXPANSION};
|
use syntax_pos::{BytePos, Span, NO_EXPANSION};
|
||||||
use codemap::SourceMap;
|
use source_map::SourceMap;
|
||||||
use errors;
|
use errors;
|
||||||
use feature_gate::UnstableFeatures;
|
use feature_gate::UnstableFeatures;
|
||||||
use parse::token;
|
use parse::token;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
use rustc_data_structures::sync::{Lrc, Lock};
|
use rustc_data_structures::sync::{Lrc, Lock};
|
||||||
use ast::{self, CrateConfig, NodeId};
|
use ast::{self, CrateConfig, NodeId};
|
||||||
use early_buffered_lints::{BufferedEarlyLint, BufferedEarlyLintId};
|
use early_buffered_lints::{BufferedEarlyLint, BufferedEarlyLintId};
|
||||||
use codemap::{SourceMap, FilePathMapping};
|
use source_map::{SourceMap, FilePathMapping};
|
||||||
use syntax_pos::{Span, SourceFile, FileName, MultiSpan};
|
use syntax_pos::{Span, SourceFile, FileName, MultiSpan};
|
||||||
use errors::{Handler, ColorConfig, DiagnosticBuilder};
|
use errors::{Handler, ColorConfig, DiagnosticBuilder};
|
||||||
use feature_gate::UnstableFeatures;
|
use feature_gate::UnstableFeatures;
|
||||||
|
|
|
@ -42,7 +42,7 @@ use ast::{UseTree, UseTreeKind};
|
||||||
use ast::{BinOpKind, UnOp};
|
use ast::{BinOpKind, UnOp};
|
||||||
use ast::{RangeEnd, RangeSyntax};
|
use ast::{RangeEnd, RangeSyntax};
|
||||||
use {ast, attr};
|
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 syntax_pos::{self, Span, MultiSpan, BytePos, FileName, edition::Edition};
|
||||||
use errors::{self, Applicability, DiagnosticBuilder, DiagnosticId};
|
use errors::{self, Applicability, DiagnosticBuilder, DiagnosticId};
|
||||||
use parse::{self, SeqSep, classify, token};
|
use parse::{self, SeqSep, classify, token};
|
||||||
|
@ -1879,7 +1879,7 @@ impl<'a> Parser<'a> {
|
||||||
let lit = self.parse_lit_token()?;
|
let lit = self.parse_lit_token()?;
|
||||||
lit
|
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)
|
/// 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> {
|
pub fn mk_mac_expr(&mut self, span: Span, m: Mac_, attrs: ThinVec<Attribute>) -> P<Expr> {
|
||||||
P(Expr {
|
P(Expr {
|
||||||
id: ast::DUMMY_NODE_ID,
|
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,
|
span,
|
||||||
attrs,
|
attrs,
|
||||||
})
|
})
|
||||||
|
@ -3074,7 +3074,7 @@ impl<'a> Parser<'a> {
|
||||||
AssocOp::Equal | AssocOp::Less | AssocOp::LessEqual | AssocOp::NotEqual |
|
AssocOp::Equal | AssocOp::Less | AssocOp::LessEqual | AssocOp::NotEqual |
|
||||||
AssocOp::Greater | AssocOp::GreaterEqual => {
|
AssocOp::Greater | AssocOp::GreaterEqual => {
|
||||||
let ast_op = op.to_ast_binop().unwrap();
|
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())
|
self.mk_expr(span, binary, ThinVec::new())
|
||||||
}
|
}
|
||||||
AssocOp::Assign =>
|
AssocOp::Assign =>
|
||||||
|
@ -3094,7 +3094,7 @@ impl<'a> Parser<'a> {
|
||||||
token::Shl => BinOpKind::Shl,
|
token::Shl => BinOpKind::Shl,
|
||||||
token::Shr => BinOpKind::Shr,
|
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())
|
self.mk_expr(span, aopexpr, ThinVec::new())
|
||||||
}
|
}
|
||||||
AssocOp::As | AssocOp::Colon | AssocOp::DotDot | AssocOp::DotDotEq => {
|
AssocOp::As | AssocOp::Colon | AssocOp::DotDot | AssocOp::DotDotEq => {
|
||||||
|
@ -3736,7 +3736,7 @@ impl<'a> Parser<'a> {
|
||||||
&mut self,
|
&mut self,
|
||||||
lo: Span,
|
lo: Span,
|
||||||
attrs: Vec<Attribute>
|
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.
|
// Check if a colon exists one ahead. This means we're parsing a fieldname.
|
||||||
let hi;
|
let hi;
|
||||||
let (subpat, fieldname, is_shorthand) = if self.look_ahead(1, |t| t == &token::Colon) {
|
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)
|
(subpat, fieldname, true)
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(codemap::Spanned {
|
Ok(source_map::Spanned {
|
||||||
span: lo.to(hi),
|
span: lo.to(hi),
|
||||||
node: ast::FieldPat {
|
node: ast::FieldPat {
|
||||||
ident: fieldname,
|
ident: fieldname,
|
||||||
|
@ -3791,7 +3791,7 @@ impl<'a> Parser<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parse the fields of a struct-like pattern
|
/// 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 fields = Vec::new();
|
||||||
let mut etc = false;
|
let mut etc = false;
|
||||||
let mut ate_comma = true;
|
let mut ate_comma = true;
|
||||||
|
@ -4518,7 +4518,7 @@ impl<'a> Parser<'a> {
|
||||||
}
|
}
|
||||||
} else if let Some(macro_def) = self.eat_macro_def(
|
} else if let Some(macro_def) = self.eat_macro_def(
|
||||||
&attrs,
|
&attrs,
|
||||||
&codemap::respan(lo, VisibilityKind::Inherited),
|
&source_map::respan(lo, VisibilityKind::Inherited),
|
||||||
lo,
|
lo,
|
||||||
)? {
|
)? {
|
||||||
Stmt {
|
Stmt {
|
||||||
|
@ -5398,7 +5398,7 @@ impl<'a> Parser<'a> {
|
||||||
_ => return Ok(None),
|
_ => 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)))
|
Ok(Some(Arg::from_self(eself, eself_ident)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ use ast::{SelfKind, GenericBound, TraitBoundModifier};
|
||||||
use ast::{Attribute, MacDelimiter, GenericArg};
|
use ast::{Attribute, MacDelimiter, GenericArg};
|
||||||
use util::parser::{self, AssocOp, Fixity};
|
use util::parser::{self, AssocOp, Fixity};
|
||||||
use attr;
|
use attr;
|
||||||
use codemap::{self, SourceMap, Spanned};
|
use source_map::{self, SourceMap, Spanned};
|
||||||
use syntax_pos::{self, BytePos};
|
use syntax_pos::{self, BytePos};
|
||||||
use syntax_pos::hygiene::{Mark, SyntaxContext};
|
use syntax_pos::hygiene::{Mark, SyntaxContext};
|
||||||
use parse::token::{self, BinOpToken, Token};
|
use parse::token::{self, BinOpToken, Token};
|
||||||
|
@ -380,7 +380,7 @@ pub fn fun_to_string(decl: &ast::FnDecl,
|
||||||
to_string(|s| {
|
to_string(|s| {
|
||||||
s.head("")?;
|
s.head("")?;
|
||||||
s.print_fn(decl, header, Some(name),
|
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 head box
|
||||||
s.end() // Close the outer box
|
s.end() // Close the outer box
|
||||||
})
|
})
|
||||||
|
@ -1606,7 +1606,7 @@ impl<'a> State<'a> {
|
||||||
ti.ident,
|
ti.ident,
|
||||||
ty,
|
ty,
|
||||||
default.as_ref().map(|expr| &**expr),
|
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) => {
|
ast::TraitItemKind::Method(ref sig, ref body) => {
|
||||||
|
@ -1617,7 +1617,7 @@ impl<'a> State<'a> {
|
||||||
ti.ident,
|
ti.ident,
|
||||||
&ti.generics,
|
&ti.generics,
|
||||||
sig,
|
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 {
|
if let Some(ref body) = *body {
|
||||||
self.nbsp()?;
|
self.nbsp()?;
|
||||||
|
@ -3085,7 +3085,7 @@ impl<'a> State<'a> {
|
||||||
ast::FnHeader { unsafety, abi, ..ast::FnHeader::default() },
|
ast::FnHeader { unsafety, abi, ..ast::FnHeader::default() },
|
||||||
name,
|
name,
|
||||||
&generics,
|
&generics,
|
||||||
&codemap::dummy_spanned(ast::VisibilityKind::Inherited))?;
|
&source_map::dummy_spanned(ast::VisibilityKind::Inherited))?;
|
||||||
self.end()
|
self.end()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3185,7 +3185,7 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use ast;
|
use ast;
|
||||||
use codemap;
|
use source_map;
|
||||||
use syntax_pos;
|
use syntax_pos;
|
||||||
use with_globals;
|
use with_globals;
|
||||||
|
|
||||||
|
@ -3205,7 +3205,7 @@ mod tests {
|
||||||
&decl,
|
&decl,
|
||||||
ast::FnHeader {
|
ast::FnHeader {
|
||||||
unsafety: ast::Unsafety::Normal,
|
unsafety: ast::Unsafety::Normal,
|
||||||
constness: codemap::dummy_spanned(ast::Constness::NotConst),
|
constness: source_map::dummy_spanned(ast::Constness::NotConst),
|
||||||
asyncness: ast::IsAsync::NotAsync,
|
asyncness: ast::IsAsync::NotAsync,
|
||||||
abi: Abi::Rust,
|
abi: Abi::Rust,
|
||||||
},
|
},
|
||||||
|
@ -3222,7 +3222,7 @@ mod tests {
|
||||||
with_globals(|| {
|
with_globals(|| {
|
||||||
let ident = ast::Ident::from_str("principal_skinner");
|
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,
|
ident,
|
||||||
attrs: Vec::new(),
|
attrs: Vec::new(),
|
||||||
// making this up as I go.... ?
|
// making this up as I go.... ?
|
||||||
|
|
|
@ -16,7 +16,7 @@ use edition::Edition;
|
||||||
use ext::hygiene::{Mark, SyntaxContext};
|
use ext::hygiene::{Mark, SyntaxContext};
|
||||||
use symbol::{Symbol, keywords};
|
use symbol::{Symbol, keywords};
|
||||||
use syntax_pos::{DUMMY_SP, Span};
|
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 ptr::P;
|
||||||
use tokenstream::TokenStream;
|
use tokenstream::TokenStream;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ use std::vec;
|
||||||
use attr::{self, HasAttrs};
|
use attr::{self, HasAttrs};
|
||||||
use syntax_pos::{self, DUMMY_SP, NO_EXPANSION, Span, SourceFile, BytePos};
|
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 errors;
|
||||||
use config;
|
use config;
|
||||||
use entry::{self, EntryPointType};
|
use entry::{self, EntryPointType};
|
||||||
|
@ -616,8 +616,8 @@ fn mk_test_module(cx: &mut TestCtxt) -> (P<ast::Item>, Option<P<ast::Item>>) {
|
||||||
(item, reexport)
|
(item, reexport)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn nospan<T>(t: T) -> codemap::Spanned<T> {
|
fn nospan<T>(t: T) -> source_map::Spanned<T> {
|
||||||
codemap::Spanned { node: t, span: DUMMY_SP }
|
source_map::Spanned { node: t, span: DUMMY_SP }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn path_node(ids: Vec<Ident>) -> ast::Path {
|
fn path_node(ids: Vec<Ident>) -> ast::Path {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use codemap::{SourceMap, FilePathMapping};
|
use source_map::{SourceMap, FilePathMapping};
|
||||||
use errors::Handler;
|
use errors::Handler;
|
||||||
use errors::emitter::EmitterWriter;
|
use errors::emitter::EmitterWriter;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use ast::{self, Ident};
|
use ast::{self, Ident};
|
||||||
use codemap::FilePathMapping;
|
use source_map::FilePathMapping;
|
||||||
use parse::{ParseSess, PResult, source_file_to_stream};
|
use parse::{ParseSess, PResult, source_file_to_stream};
|
||||||
use parse::{lexer, new_parser_from_source_str};
|
use parse::{lexer, new_parser_from_source_str};
|
||||||
use parse::parser::Parser;
|
use parse::parser::Parser;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use syntax::ast::*;
|
use syntax::ast::*;
|
||||||
use syntax::codemap::Spanned;
|
use syntax::source_map::Spanned;
|
||||||
use syntax::ext::base::*;
|
use syntax::ext::base::*;
|
||||||
use syntax::ext::build::AstBuilder;
|
use syntax::ext::build::AstBuilder;
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
|
|
|
@ -14,7 +14,7 @@ use errors::FatalError;
|
||||||
use proc_macro::{TokenStream, __internal};
|
use proc_macro::{TokenStream, __internal};
|
||||||
use syntax::ast::{self, ItemKind, Attribute, Mac};
|
use syntax::ast::{self, ItemKind, Attribute, Mac};
|
||||||
use syntax::attr::{mark_used, mark_known};
|
use syntax::attr::{mark_used, mark_known};
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use syntax::ext::base::*;
|
use syntax::ext::base::*;
|
||||||
use syntax::visit::Visitor;
|
use syntax::visit::Visitor;
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ use syntax::ast::{VariantData, GenericParamKind, GenericArg};
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::ext::base::{Annotatable, ExtCtxt};
|
use syntax::ext::base::{Annotatable, ExtCtxt};
|
||||||
use syntax::ext::build::AstBuilder;
|
use syntax::ext::build::AstBuilder;
|
||||||
use syntax::codemap::{self, respan};
|
use syntax::source_map::{self, respan};
|
||||||
use syntax::util::move_map::MoveMap;
|
use syntax::util::move_map::MoveMap;
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax::symbol::{Symbol, keywords};
|
use syntax::symbol::{Symbol, keywords};
|
||||||
|
@ -1619,7 +1619,7 @@ impl<'a> TraitDef<'a> {
|
||||||
if ident.is_none() {
|
if ident.is_none() {
|
||||||
cx.span_bug(sp, "a braced struct with unnamed fields in `derive`");
|
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()),
|
span: pat.span.with_ctxt(self.span.ctxt()),
|
||||||
node: ast::FieldPat {
|
node: ast::FieldPat {
|
||||||
ident: ident.unwrap(),
|
ident: ident.unwrap(),
|
||||||
|
|
|
@ -18,7 +18,7 @@ use syntax::ast;
|
||||||
use syntax::ast::{Expr, GenericParamKind, Generics, Ident, SelfKind, GenericArg};
|
use syntax::ast::{Expr, GenericParamKind, Generics, Ident, SelfKind, GenericArg};
|
||||||
use syntax::ext::base::ExtCtxt;
|
use syntax::ext::base::ExtCtxt;
|
||||||
use syntax::ext::build::AstBuilder;
|
use syntax::ext::build::AstBuilder;
|
||||||
use syntax::codemap::{respan, DUMMY_SP};
|
use syntax::source_map::{respan, DUMMY_SP};
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax_pos::Span;
|
use syntax_pos::Span;
|
||||||
use syntax_pos::symbol::keywords;
|
use syntax_pos::symbol::keywords;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
use rustc_data_structures::small_vec::OneVector;
|
use rustc_data_structures::small_vec::OneVector;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::respan;
|
use syntax::source_map::respan;
|
||||||
use syntax::ext::base;
|
use syntax::ext::base;
|
||||||
use syntax::ext::base::*;
|
use syntax::ext::base::*;
|
||||||
use syntax::feature_gate;
|
use syntax::feature_gate;
|
||||||
|
|
|
@ -12,7 +12,7 @@ use std::panic;
|
||||||
|
|
||||||
use errors::FatalError;
|
use errors::FatalError;
|
||||||
|
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use syntax::ext::base::*;
|
use syntax::ext::base::*;
|
||||||
use syntax::tokenstream::TokenStream;
|
use syntax::tokenstream::TokenStream;
|
||||||
use syntax::ext::base;
|
use syntax::ext::base;
|
||||||
|
|
|
@ -14,7 +14,7 @@ use errors;
|
||||||
|
|
||||||
use syntax::ast::{self, Ident};
|
use syntax::ast::{self, Ident};
|
||||||
use syntax::attr;
|
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::base::ExtCtxt;
|
||||||
use syntax::ext::build::AstBuilder;
|
use syntax::ext::build::AstBuilder;
|
||||||
use syntax::ext::expand::ExpansionConfig;
|
use syntax::ext::expand::ExpansionConfig;
|
||||||
|
|
|
@ -16,7 +16,7 @@ extern crate syntax;
|
||||||
extern crate syntax_pos;
|
extern crate syntax_pos;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::FilePathMapping;
|
use syntax::source_map::FilePathMapping;
|
||||||
use syntax::print::pprust;
|
use syntax::print::pprust;
|
||||||
use syntax::symbol::Symbol;
|
use syntax::symbol::Symbol;
|
||||||
use syntax_pos::DUMMY_SP;
|
use syntax_pos::DUMMY_SP;
|
||||||
|
|
|
@ -18,7 +18,7 @@ extern crate syntax;
|
||||||
extern crate syntax_pos;
|
extern crate syntax_pos;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap;
|
use syntax::source_map;
|
||||||
use syntax::print::pprust;
|
use syntax::print::pprust;
|
||||||
use syntax::symbol::Symbol;
|
use syntax::symbol::Symbol;
|
||||||
use syntax_pos::DUMMY_SP;
|
use syntax_pos::DUMMY_SP;
|
||||||
|
@ -28,7 +28,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run() {
|
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 resolver = syntax::ext::base::DummyResolver;
|
||||||
let mut cx = syntax::ext::base::ExtCtxt::new(
|
let mut cx = syntax::ext::base::ExtCtxt::new(
|
||||||
&ps,
|
&ps,
|
||||||
|
|
|
@ -24,7 +24,7 @@ use rustc::session::config::{Input, Options,
|
||||||
use rustc_driver::driver::{self, compile_input, CompileController};
|
use rustc_driver::driver::{self, compile_input, CompileController};
|
||||||
use rustc_metadata::cstore::CStore;
|
use rustc_metadata::cstore::CStore;
|
||||||
use rustc_errors::registry::Registry;
|
use rustc_errors::registry::Registry;
|
||||||
use syntax::codemap::FileName;
|
use syntax::source_map::FileName;
|
||||||
use rustc_codegen_utils::codegen_backend::CodegenBackend;
|
use rustc_codegen_utils::codegen_backend::CodegenBackend;
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
|
@ -17,7 +17,7 @@ extern crate syntax;
|
||||||
use syntax::ast::*;
|
use syntax::ast::*;
|
||||||
use syntax::attr::*;
|
use syntax::attr::*;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::{FilePathMapping, FileName};
|
use syntax::source_map::{FilePathMapping, FileName};
|
||||||
use syntax::parse;
|
use syntax::parse;
|
||||||
use syntax::parse::{ParseSess, PResult};
|
use syntax::parse::{ParseSess, PResult};
|
||||||
use syntax::parse::new_parser_from_source_str;
|
use syntax::parse::new_parser_from_source_str;
|
||||||
|
|
|
@ -22,7 +22,7 @@ use deriving::generic::ty::*;
|
||||||
|
|
||||||
use rustc_plugin::Registry;
|
use rustc_plugin::Registry;
|
||||||
use syntax::ast::*;
|
use syntax::ast::*;
|
||||||
use syntax::codemap::Span;
|
use syntax::source_map::Span;
|
||||||
use syntax::ext::base::*;
|
use syntax::ext::base::*;
|
||||||
use syntax::ext::build::AstBuilder;
|
use syntax::ext::build::AstBuilder;
|
||||||
use syntax::symbol::Symbol;
|
use syntax::symbol::Symbol;
|
||||||
|
|
|
@ -18,7 +18,7 @@ extern crate rustc_plugin;
|
||||||
extern crate syntax_pos;
|
extern crate syntax_pos;
|
||||||
|
|
||||||
use syntax::ast::{self, Item, MetaItem, ItemKind};
|
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::base::*;
|
||||||
use syntax::ext::quote::rt::ToTokens;
|
use syntax::ext::quote::rt::ToTokens;
|
||||||
use syntax::parse::{self, token};
|
use syntax::parse::{self, token};
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue