rustc_target: move in syntax::abi and flip dependency.

This commit is contained in:
Irina Popa 2018-04-25 19:30:39 +03:00
parent 030244cd4a
commit 04fa0e7bb3
80 changed files with 106 additions and 77 deletions

11
src/Cargo.lock generated
View File

@ -1833,6 +1833,7 @@ version = "0.0.0"
dependencies = [
"rustc 0.0.0",
"rustc_errors 0.0.0",
"rustc_target 0.0.0",
"syntax 0.0.0",
"syntax_pos 0.0.0",
]
@ -1885,6 +1886,7 @@ name = "rustc_cratesio_shim"
version = "0.0.0"
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1896,6 +1898,7 @@ dependencies = [
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot_core 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_cratesio_shim 0.0.0",
"serialize 0.0.0",
"stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1966,6 +1969,7 @@ dependencies = [
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_mir 0.0.0",
"rustc_target 0.0.0",
"syntax 0.0.0",
"syntax_pos 0.0.0",
]
@ -2106,6 +2110,7 @@ dependencies = [
"rustc 0.0.0",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_data_structures 0.0.0",
"rustc_target 0.0.0",
"rustc_typeck 0.0.0",
"syntax 0.0.0",
"syntax_pos 0.0.0",
@ -2117,8 +2122,8 @@ version = "0.0.0"
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_cratesio_shim 0.0.0",
"serialize 0.0.0",
"syntax 0.0.0",
]
[[package]]
@ -2204,6 +2209,7 @@ dependencies = [
"rustc_data_structures 0.0.0",
"rustc_errors 0.0.0",
"rustc_platform_intrinsics 0.0.0",
"rustc_target 0.0.0",
"syntax 0.0.0",
"syntax_pos 0.0.0",
]
@ -2542,9 +2548,9 @@ version = "0.0.0"
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_cratesio_shim 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_errors 0.0.0",
"rustc_target 0.0.0",
"scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serialize 0.0.0",
"syntax_pos 0.0.0",
@ -2558,6 +2564,7 @@ dependencies = [
"proc_macro 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_errors 0.0.0",
"rustc_target 0.0.0",
"syntax 0.0.0",
"syntax_pos 0.0.0",
]

View File

@ -41,7 +41,7 @@
//! This order consistency is required in a few places in rustc, for
//! example generator inference, and possibly also HIR borrowck.
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast::{NodeId, CRATE_NODE_ID, Name, Attribute};
use syntax_pos::Span;
use hir::*;

View File

@ -25,7 +25,7 @@ use hir as ast;
use hir::map::{self, Node};
use hir::{Expr, FnDecl};
use hir::intravisit::FnKind;
use syntax::abi;
use rustc_target::spec::abi;
use syntax::ast::{Attribute, Name, NodeId};
use syntax_pos::Span;

View File

@ -21,7 +21,7 @@ use hir::def_id::{CRATE_DEF_INDEX, DefId, LocalDefId, DefIndexAddressSpace};
use middle::cstore::CrateStore;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast::{self, Name, NodeId, CRATE_NODE_ID};
use syntax::codemap::Spanned;
use syntax::ext::base::MacroKind;

View File

@ -34,7 +34,7 @@ use mir::mono::Linkage;
use syntax_pos::{Span, DUMMY_SP};
use syntax::codemap::{self, Spanned};
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast::{self, Name, NodeId, DUMMY_NODE_ID, AsmDialect};
use syntax::ast::{Attribute, Lit, StrStyle, FloatTy, IntTy, UintTy, MetaItem};
use syntax::attr::InlineAttr;

View File

@ -10,7 +10,7 @@
pub use self::AnnNode::*;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::codemap::{CodeMap, Spanned};
use syntax::parse::{token, ParseSess};

View File

@ -82,7 +82,7 @@ impl_stable_hash_for!(enum ::syntax::ext::base::MacroKind {
});
impl_stable_hash_for!(enum ::syntax::abi::Abi {
impl_stable_hash_for!(enum ::rustc_target::spec::abi::Abi {
Cdecl,
Stdcall,
Fastcall,

View File

@ -13,7 +13,7 @@ use hir::def_id::DefId;
use ty::{self, Ty, TyCtxt};
use ty::layout::{LayoutError, Pointer, SizeSkeleton};
use syntax::abi::Abi::RustIntrinsic;
use rustc_target::spec::abi::Abi::RustIntrinsic;
use syntax_pos::Span;
use hir::intravisit::{self, Visitor, NestedVisitorMap};
use hir;

View File

@ -26,7 +26,7 @@ use middle::privacy;
use session::config;
use util::nodemap::{NodeSet, FxHashSet};
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::attr;
use hir;

View File

@ -1091,7 +1091,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
false,
hir::Unsafety::Normal,
::syntax::abi::Abi::Rust
::rustc_target::spec::abi::Abi::Rust
)
} else {
tcx.mk_fn_sig(
@ -1099,7 +1099,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
false,
hir::Unsafety::Normal,
::syntax::abi::Abi::Rust
::rustc_target::spec::abi::Abi::Rust
)
};
format!("{}", ty::Binder::bind(sig))

View File

@ -51,7 +51,7 @@ use std::cmp;
use std::fmt;
use std::mem;
use std::rc::Rc;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use hir;
use util::nodemap::{FxHashMap, FxHashSet};

View File

@ -70,7 +70,7 @@ use std::ops::Deref;
use std::iter;
use std::sync::mpsc;
use std::sync::Arc;
use syntax::abi;
use rustc_target::spec::abi;
use syntax::ast::{self, NodeId};
use syntax::attr;
use syntax::codemap::MultiSpan;

View File

@ -11,7 +11,7 @@
use hir::def_id::DefId;
use ty::{self, BoundRegion, Region, Ty, TyCtxt};
use std::fmt;
use syntax::abi;
use rustc_target::spec::abi;
use syntax::ast;
use errors::DiagnosticBuilder;
use syntax_pos::Span;

View File

@ -12,7 +12,7 @@ use hir::def_id::DefId;
use ty::{self, Ty, TypeFoldable, Substs, TyCtxt};
use ty::subst::Kind;
use traits;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use util::ppaux;
use std::fmt;

View File

@ -22,7 +22,7 @@ use mir::interpret::{GlobalId, Value, PrimVal};
use util::common::ErrorReported;
use std::rc::Rc;
use std::iter;
use syntax::abi;
use rustc_target::spec::abi;
use hir as ast;
use rustc_data_structures::accumulate_vec::AccumulateVec;

View File

@ -44,7 +44,7 @@ CloneTypeFoldableAndLiftImpls! {
::hir::MatchSource,
::hir::Mutability,
::hir::Unsafety,
::syntax::abi::Abi,
::rustc_target::spec::abi::Abi,
::mir::Local,
::mir::Promoted,
::traits::Reveal,

View File

@ -22,7 +22,7 @@ use util::captures::Captures;
use std::iter;
use std::cmp::Ordering;
use syntax::abi;
use rustc_target::spec::abi;
use syntax::ast::{self, Name};
use syntax::symbol::{keywords, InternedString};

View File

@ -28,7 +28,7 @@ use std::fmt;
use std::usize;
use rustc_data_structures::indexed_vec::Idx;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast::CRATE_NODE_ID;
use syntax::symbol::{Symbol, InternedString};
use hir;

View File

@ -11,5 +11,6 @@ test = false
[dependencies]
rustc = { path = "../librustc" }
rustc_errors = { path = "../librustc_errors" }
rustc_target = { path = "../librustc_target" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }

View File

@ -10,7 +10,7 @@
use rustc::middle::allocator::AllocatorKind;
use rustc_errors;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast::{Attribute, Crate, LitKind, StrStyle};
use syntax::ast::{Arg, Constness, Generics, Mac, Mutability, Ty, Unsafety};
use syntax::ast::{self, Expr, Ident, Item, ItemKind, TyKind, VisibilityKind};

View File

@ -12,6 +12,7 @@
extern crate rustc;
extern crate rustc_errors;
extern crate rustc_target;
extern crate syntax;
extern crate syntax_pos;

View File

@ -21,3 +21,4 @@ crate-type = ["dylib"]
[dependencies]
bitflags = "1.0"
log = "0.4"

View File

@ -12,3 +12,4 @@
#![allow(unused_extern_crates)]
extern crate bitflags;
extern crate log;

View File

@ -11,6 +11,7 @@ crate-type = ["dylib"]
[dependencies]
ena = "0.9.1"
log = "0.4"
rustc_cratesio_shim = { path = "../librustc_cratesio_shim" }
serialize = { path = "../libserialize" }
cfg-if = "0.1.2"
stable_deref_trait = "1.0.0"

View File

@ -45,6 +45,10 @@ extern crate parking_lot;
extern crate cfg_if;
extern crate stable_deref_trait;
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
#[allow(unused_extern_crates)]
extern crate rustc_cratesio_shim;
pub use rustc_serialize::hex::ToHex;
pub mod array_vec;

View File

@ -31,7 +31,7 @@ use rustc::session::config::{OutputFilenames, OutputTypes};
use rustc_data_structures::sync::{self, Lrc};
use syntax;
use syntax::ast;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::codemap::{CodeMap, FilePathMapping, FileName};
use errors;
use errors::emitter::Emitter;

View File

@ -13,5 +13,6 @@ test = false
log = "0.4"
rustc = { path = "../librustc" }
rustc_mir = { path = "../librustc_mir"}
rustc_target = { path = "../librustc_target" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }

View File

@ -13,7 +13,7 @@ use rustc::ty;
use lint::{LateContext, LintContext, LintArray};
use lint::{LintPass, LateLintPass};
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::attr;
use syntax_pos::Span;

View File

@ -1169,7 +1169,7 @@ impl LintPass for MutableTransmutes {
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MutableTransmutes {
fn check_expr(&mut self, cx: &LateContext, expr: &hir::Expr) {
use syntax::abi::Abi::RustIntrinsic;
use rustc_target::spec::abi::Abi::RustIntrinsic;
let msg = "mutating transmuted &mut T from &T may cause undefined behavior, \
consider instead using an UnsafeCell";

View File

@ -37,6 +37,7 @@ extern crate rustc;
#[macro_use]
extern crate log;
extern crate rustc_mir;
extern crate rustc_target;
extern crate syntax_pos;
use rustc::lint;

View File

@ -22,7 +22,7 @@ use std::cmp;
use std::{i8, i16, i32, i64, u8, u16, u32, u64, f32, f64};
use syntax::{ast, attr};
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax_pos::Span;
use syntax::codemap;

View File

@ -11,7 +11,7 @@
use rustc::hir::itemlikevisit::ItemLikeVisitor;
use rustc::hir;
use rustc::ty::TyCtxt;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
pub fn collect<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Vec<String> {
let mut collector = Collector {

View File

@ -14,7 +14,7 @@ use rustc::middle::cstore::{self, NativeLibrary};
use rustc::session::Session;
use rustc::ty::TyCtxt;
use rustc::util::nodemap::FxHashSet;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::attr;
use syntax::codemap::Span;
use syntax::feature_gate::{self, GateIssue};

View File

@ -16,7 +16,7 @@ use hair::*;
use rustc::ty;
use rustc::mir::*;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
/// Compile `expr`, storing the result into `destination`, which

View File

@ -25,7 +25,7 @@ use rustc_data_structures::indexed_vec::{IndexVec, Idx};
use shim;
use std::mem;
use std::u32;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::attr::{self, UnwindAttr};
use syntax::symbol::keywords;

View File

@ -2,7 +2,7 @@ use rustc::mir;
use rustc::ty::{self, Ty};
use rustc::ty::layout::LayoutOf;
use syntax::codemap::Span;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use rustc::mir::interpret::{EvalResult, PrimVal, Value};
use super::{EvalContext, Place, Machine, ValTy};

View File

@ -339,7 +339,7 @@ impl<'a, 'tcx> DefPathBasedNames<'a, 'tcx> {
}
let abi = sig.abi();
if abi != ::syntax::abi::Abi::Rust {
if abi != ::rustc_target::spec::abi::Abi::Rust {
output.push_str("extern \"");
output.push_str(abi.name());
output.push_str("\" ");

View File

@ -20,7 +20,7 @@ use rustc::mir::interpret::{Value, PrimVal};
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax_pos::Span;

View File

@ -28,7 +28,7 @@ use transform::{MirPass, MirSource};
use super::simplify::{remove_dead_blocks, CfgSimplifier};
use syntax::{attr};
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
const DEFAULT_THRESHOLD: usize = 50;
const HINT_THRESHOLD: usize = 100;

View File

@ -29,7 +29,7 @@ use rustc::mir::*;
use rustc::mir::traversal::ReversePostorder;
use rustc::mir::visit::{PlaceContext, Visitor};
use rustc::middle::lang_items;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::attr;
use syntax::ast::LitKind;
use syntax::feature_gate::UnstableFeatures;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use syntax::abi::{Abi};
use rustc_target::spec::abi::{Abi};
use syntax::ast;
use syntax_pos::Span;

View File

@ -12,6 +12,7 @@ crate-type = ["dylib"]
log = "0.4"
rustc = { path = "../librustc" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_target = { path = "../librustc_target" }
rustc_typeck = { path = "../librustc_typeck" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }

View File

@ -22,6 +22,7 @@ extern crate rustc;
extern crate log;
extern crate rustc_data_structures;
extern crate rustc_serialize;
extern crate rustc_target;
extern crate rustc_typeck;
#[macro_use]
extern crate syntax;

View File

@ -237,7 +237,7 @@ impl Sig for ast::Ty {
if f.unsafety == ast::Unsafety::Unsafe {
text.push_str("unsafe ");
}
if f.abi != ::syntax::abi::Abi::Rust {
if f.abi != ::rustc_target::spec::abi::Abi::Rust {
text.push_str("extern");
text.push_str(&f.abi.to_string());
text.push(' ');
@ -388,7 +388,7 @@ impl Sig for ast::Item {
if unsafety == ast::Unsafety::Unsafe {
text.push_str("unsafe ");
}
if abi != ::syntax::abi::Abi::Rust {
if abi != ::rustc_target::spec::abi::Abi::Rust {
text.push_str("extern");
text.push_str(&abi.to_string());
text.push(' ');
@ -931,7 +931,7 @@ fn make_method_signature(
if m.unsafety == ast::Unsafety::Unsafe {
text.push_str("unsafe ");
}
if m.abi != ::syntax::abi::Abi::Rust {
if m.abi != ::rustc_target::spec::abi::Abi::Rust {
text.push_str("extern");
text.push_str(&m.abi.to_string());
text.push(' ');

View File

@ -11,7 +11,7 @@ crate-type = ["dylib"]
[dependencies]
bitflags = "1.0"
log = "0.4"
syntax = { path = "../libsyntax" }
rustc_cratesio_shim = { path = "../librustc_cratesio_shim" }
serialize = { path = "../libserialize" }
[features]

View File

@ -458,22 +458,22 @@ pub struct FnType<'a, Ty> {
}
impl<'a, Ty> FnType<'a, Ty> {
pub fn adjust_for_cabi<C>(&mut self, cx: C, abi: ::syntax::abi::Abi) -> Result<(), String>
pub fn adjust_for_cabi<C>(&mut self, cx: C, abi: ::spec::abi::Abi) -> Result<(), String>
where Ty: TyLayoutMethods<'a, C> + Copy,
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec
{
match &cx.target_spec().arch[..] {
"x86" => {
let flavor = if abi == ::syntax::abi::Abi::Fastcall {
let flavor = if abi == ::spec::abi::Abi::Fastcall {
x86::Flavor::Fastcall
} else {
x86::Flavor::General
};
x86::compute_abi_info(cx, self, flavor);
},
"x86_64" => if abi == ::syntax::abi::Abi::SysV64 {
"x86_64" => if abi == ::spec::abi::Abi::SysV64 {
x86_64::compute_abi_info(cx, self);
} else if abi == ::syntax::abi::Abi::Win64 || cx.target_spec().options.is_like_windows {
} else if abi == ::spec::abi::Abi::Win64 || cx.target_spec().options.is_like_windows {
x86_win64::compute_abi_info(self);
} else {
x86_64::compute_abi_info(cx, self);

View File

@ -33,11 +33,14 @@
#[macro_use]
extern crate bitflags;
extern crate syntax;
extern crate serialize;
#[macro_use] extern crate log;
extern crate serialize as rustc_serialize; // used by deriving
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
#[allow(unused_extern_crates)]
extern crate rustc_cratesio_shim;
pub mod abi;
pub mod spec;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use syntax::abi::Abi;
use spec::abi::Abi;
// All the calling conventions trigger an assertion(Unsupported calling convention) in llvm on arm
pub fn abi_blacklist() -> Vec<Abi> {

View File

@ -50,8 +50,9 @@ use std::default::Default;
use std::{fmt, io};
use std::path::{Path, PathBuf};
use std::str::FromStr;
use syntax::abi::{Abi, lookup as lookup_abi};
use spec::abi::{Abi, lookup as lookup_abi};
pub mod abi;
mod android_base;
mod apple_base;
mod apple_ios_base;

View File

@ -24,7 +24,7 @@ use rustc::ty::layout;
use libc::c_uint;
pub use syntax::abi::Abi;
pub use rustc_target::spec::abi::Abi;
pub use rustc::ty::layout::{FAT_PTR_ADDR, FAT_PTR_EXTRA};
pub use rustc_target::abi::call::*;

View File

@ -32,7 +32,7 @@ use rustc::hir;
use libc::{c_uint, c_char};
use std::iter;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::symbol::InternedString;
use syntax_pos::{Span, DUMMY_SP};

View File

@ -18,5 +18,6 @@ rustc = { path = "../librustc" }
rustc_const_math = { path = "../librustc_const_math" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_platform_intrinsics = { path = "../librustc_platform_intrinsics" }
rustc_target = { path = "../librustc_target" }
syntax_pos = { path = "../libsyntax_pos" }
rustc_errors = { path = "../librustc_errors" }

View File

@ -23,6 +23,7 @@ use rustc::ty::subst::{Kind, UnpackedKind, Subst, Substs};
use rustc::traits;
use rustc::ty::{self, RegionKind, Ty, TyCtxt, ToPredicate, TypeFoldable};
use rustc::ty::wf::object_region_bounds;
use rustc_target::spec::abi;
use std::slice;
use require_c_abi_if_variadic;
use util::common::ErrorReported;
@ -30,7 +31,7 @@ use util::nodemap::FxHashSet;
use errors::FatalError;
use std::iter;
use syntax::{abi, ast};
use syntax::ast;
use syntax::feature_gate::{GateIssue, emit_feature_err};
use syntax_pos::Span;

View File

@ -17,7 +17,7 @@ use hir::def_id::{DefId, LOCAL_CRATE};
use rustc::{infer, traits};
use rustc::ty::{self, TyCtxt, TypeFoldable, Ty};
use rustc::ty::adjustment::{Adjustment, Adjust, AllowTwoPhase, AutoBorrow, AutoBorrowMutability};
use syntax::abi;
use rustc_target::spec::abi;
use syntax::symbol::Symbol;
use syntax_pos::Span;

View File

@ -23,7 +23,7 @@ use rustc::ty::subst::Substs;
use rustc::ty::TypeFoldable;
use std::cmp;
use std::iter;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::codemap::Span;
use rustc::hir;

View File

@ -17,7 +17,7 @@ use rustc::ty::{self, TyCtxt, Ty};
use rustc::util::nodemap::FxHashMap;
use require_same_types;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::symbol::Symbol;
use syntax_pos::Span;

View File

@ -118,7 +118,7 @@ use std::fmt::Display;
use std::mem::replace;
use std::iter;
use std::ops::{self, Deref};
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast;
use syntax::attr;
use syntax::codemap::{original_sp, Spanned};

View File

@ -38,8 +38,9 @@ use rustc::ty::util::IntTypeExt;
use rustc::ty::util::Discr;
use rustc::util::captures::Captures;
use rustc::util::nodemap::FxHashMap;
use rustc_target::spec::abi;
use syntax::{abi, ast};
use syntax::ast;
use syntax::ast::MetaItemKind;
use syntax::attr::{InlineAttr, list_contains_name, mark_used};
use syntax::codemap::Spanned;

View File

@ -94,6 +94,7 @@ extern crate rustc_platform_intrinsics as intrinsics;
extern crate rustc_const_math;
extern crate rustc_data_structures;
extern crate rustc_errors as errors;
extern crate rustc_target;
use rustc::hir;
use rustc::lint;
@ -111,7 +112,7 @@ use session::{CompileIncomplete, config};
use util::common::time;
use syntax::ast;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax_pos::Span;
use std::iter;

View File

@ -23,7 +23,8 @@ use rustc::ty::{self, AdtKind, CratePredicatesMap, Region, RegionKind, ReprOptio
ToPolyTraitRef, ToPredicate, Ty, TyCtxt};
use rustc::util::nodemap::{FxHashMap, FxHashSet};
use rustc_data_structures::sync::Lrc;
use syntax::{abi, ast};
use rustc_target::spec::abi;
use syntax::ast;
use syntax_pos::{Span, DUMMY_SP};
/// Infer predicates for the items in the crate.

View File

@ -20,7 +20,7 @@ pub use self::FunctionRetTy::*;
pub use self::Visibility::*;
use syntax;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast::{self, AttrStyle, Ident};
use syntax::attr;
use syntax::codemap::{dummy_spanned, Spanned};

View File

@ -13,7 +13,7 @@
pub use self::StructType::*;
pub use self::TypeBound::*;
use syntax::abi;
use rustc_target::spec::abi;
use syntax::ast;
use syntax::ast::{Name, NodeId};
use syntax::attr;

View File

@ -19,7 +19,7 @@ use std::fmt;
use std::iter::repeat;
use rustc::hir::def_id::DefId;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use rustc::hir;
use clean::{self, PrimitiveType};

View File

@ -54,7 +54,7 @@ use std::sync::Arc;
use externalfiles::ExternalHtml;
use serialize::json::{ToJson, Json, as_json};
use syntax::{abi, ast};
use syntax::ast;
use syntax::codemap::FileName;
use rustc::hir::def_id::{CrateNum, CRATE_DEF_INDEX, DefId};
use rustc::middle::privacy::AccessLevels;
@ -62,6 +62,7 @@ use rustc::middle::stability;
use rustc::hir;
use rustc::util::nodemap::{FxHashMap, FxHashSet};
use rustc_data_structures::flock;
use rustc_target::spec::abi;
use clean::{self, AttributesExt, GetDefId, SelfTy, Mutability};
use doctree;

View File

@ -36,6 +36,7 @@ extern crate rustc_driver;
extern crate rustc_resolve;
extern crate rustc_lint;
extern crate rustc_metadata;
extern crate rustc_target;
extern crate rustc_typeck;
extern crate serialize;
#[macro_use] extern crate syntax;

View File

@ -13,7 +13,7 @@
use std::mem;
use syntax::abi;
use rustc_target::spec::abi;
use syntax::ast;
use syntax::attr;
use syntax_pos::Span;

View File

@ -14,6 +14,6 @@ serialize = { path = "../libserialize" }
log = "0.4"
scoped-tls = "0.1"
syntax_pos = { path = "../libsyntax_pos" }
rustc_cratesio_shim = { path = "../librustc_cratesio_shim" }
rustc_errors = { path = "../librustc_errors" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_target = { path = "../librustc_target" }

View File

@ -19,7 +19,7 @@ pub use util::parser::ExprPrecedence;
use syntax_pos::{Span, DUMMY_SP};
use codemap::{respan, Spanned};
use abi::Abi;
use rustc_target::spec::abi::Abi;
use ext::hygiene::{Mark, SyntaxContext};
use print::pprust;
use ptr::P;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use abi::Abi;
use rustc_target::spec::abi::Abi;
use ast::{self, Ident, Generics, Expr, BlockCheckMode, UnOp, PatKind};
use attr;
use syntax_pos::{Pos, Span, DUMMY_SP};

View File

@ -25,7 +25,7 @@
use self::AttributeType::*;
use self::AttributeGate::*;
use abi::Abi;
use rustc_target::spec::abi::Abi;
use ast::{self, NodeId, PatKind, RangeEnd};
use attr;
use edition::{ALL_EDITIONS, Edition};

View File

@ -28,10 +28,6 @@
#![recursion_limit="256"]
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
#[allow(unused_extern_crates)]
extern crate rustc_cratesio_shim;
#[macro_use] extern crate bitflags;
extern crate core;
extern crate serialize;
@ -39,6 +35,7 @@ extern crate serialize;
pub extern crate rustc_errors as errors;
extern crate syntax_pos;
extern crate rustc_data_structures;
extern crate rustc_target;
#[macro_use] extern crate scoped_tls;
extern crate serialize as rustc_serialize; // used by deriving
@ -138,7 +135,6 @@ pub mod syntax {
pub use ast;
}
pub mod abi;
pub mod ast;
pub mod attr;
pub mod codemap;

View File

@ -678,7 +678,7 @@ mod tests {
use syntax_pos::{self, Span, BytePos, Pos, NO_EXPANSION};
use codemap::{respan, Spanned};
use ast::{self, Ident, PatKind};
use abi::Abi;
use rustc_target::spec::abi::Abi;
use attr::first_attr_value_str_by_name;
use parse;
use parse::parser::Parser;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use abi::{self, Abi};
use rustc_target::spec::abi::{self, Abi};
use ast::{AngleBracketedParameterData, ParenthesizedParameterData, AttrStyle, BareFnTy};
use ast::{RegionTyParamBound, TraitTyParamBound, TraitBoundModifier};
use ast::Unsafety;

View File

@ -10,7 +10,7 @@
pub use self::AnnNode::*;
use abi::{self, Abi};
use rustc_target::spec::abi::{self, Abi};
use ast::{self, BlockCheckMode, PatKind, RangeEnd, RangeSyntax};
use ast::{SelfKind, RegionTyParamBound, TraitTyParamBound, TraitBoundModifier};
use ast::Attribute;

View File

@ -563,7 +563,7 @@ fn mk_main(cx: &mut TestCtxt) -> P<ast::Item> {
let main = ast::ItemKind::Fn(ecx.fn_decl(vec![], ast::FunctionRetTy::Ty(main_ret_ty)),
ast::Unsafety::Normal,
dummy_spanned(ast::Constness::NotConst),
::abi::Abi::Rust, ast::Generics::default(), main_body);
::rustc_target::spec::abi::Abi::Rust, ast::Generics::default(), main_body);
P(ast::Item {
ident: Ident::from_str("main"),
attrs: vec![main_attr],

View File

@ -23,7 +23,7 @@
//! instance, a walker looking for item names in a module will miss all of
//! those that are created by the expansion of a macro.
use abi::Abi;
use rustc_target::spec::abi::Abi;
use ast::*;
use syntax_pos::Span;
use codemap::Spanned;

View File

@ -15,3 +15,4 @@ rustc_errors = { path = "../librustc_errors" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_target = { path = "../librustc_target" }

View File

@ -191,7 +191,7 @@ use std::cell::RefCell;
use std::collections::HashSet;
use std::vec;
use syntax::abi::Abi;
use rustc_target::spec::abi::Abi;
use syntax::ast::{
self, BinOpKind, EnumDef, Expr, GenericParam, Generics, Ident, PatKind, VariantData
};

View File

@ -27,6 +27,7 @@ extern crate syntax_pos;
extern crate proc_macro;
extern crate rustc_data_structures;
extern crate rustc_errors as errors;
extern crate rustc_target;
#[cfg(not(stage0))]
mod diagnostics;