diff options
| author | Irina Popa <irinagpopa@gmail.com> | 2018-04-25 19:30:39 +0300 |
|---|---|---|
| committer | Irina Popa <irinagpopa@gmail.com> | 2018-04-26 17:49:16 +0300 |
| commit | 04fa0e7bb3e462080be4a6cee45fd94b1c27d287 (patch) | |
| tree | 13f3f018ba821be9c9375d5d06b3314e7994d7a1 /src | |
| parent | 030244cd4a76914af7dc2939ed1a16f394ceda48 (diff) | |
| download | rust-04fa0e7bb3e462080be4a6cee45fd94b1c27d287.tar.gz rust-04fa0e7bb3e462080be4a6cee45fd94b1c27d287.zip | |
rustc_target: move in syntax::abi and flip dependency.
Diffstat (limited to 'src')
80 files changed, 106 insertions, 77 deletions
diff --git a/src/Cargo.lock b/src/Cargo.lock index 878212d4ee4..e14b9da9713 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -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", ] diff --git a/src/librustc/hir/intravisit.rs b/src/librustc/hir/intravisit.rs index be9f8b8dac5..62f3f9f4486 100644 --- a/src/librustc/hir/intravisit.rs +++ b/src/librustc/hir/intravisit.rs @@ -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::*; diff --git a/src/librustc/hir/map/blocks.rs b/src/librustc/hir/map/blocks.rs index 1eaacdb1d7f..362c0bf07f7 100644 --- a/src/librustc/hir/map/blocks.rs +++ b/src/librustc/hir/map/blocks.rs @@ -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; diff --git a/src/librustc/hir/map/mod.rs b/src/librustc/hir/map/mod.rs index 9520ed32af9..a9613a60a57 100644 --- a/src/librustc/hir/map/mod.rs +++ b/src/librustc/hir/map/mod.rs @@ -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; diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index f471ffb072d..0dc89d64bd5 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -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; diff --git a/src/librustc/hir/print.rs b/src/librustc/hir/print.rs index d3f2458ef87..3943c30127d 100644 --- a/src/librustc/hir/print.rs +++ b/src/librustc/hir/print.rs @@ -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}; diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs index 4ac678aaa05..d7e16ab3620 100644 --- a/src/librustc/ich/impls_syntax.rs +++ b/src/librustc/ich/impls_syntax.rs @@ -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, diff --git a/src/librustc/middle/intrinsicck.rs b/src/librustc/middle/intrinsicck.rs index 0a4e5094cde..27f7dbf508d 100644 --- a/src/librustc/middle/intrinsicck.rs +++ b/src/librustc/middle/intrinsicck.rs @@ -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; diff --git a/src/librustc/middle/reachable.rs b/src/librustc/middle/reachable.rs index 48a62c8c14d..0aeb15b49fb 100644 --- a/src/librustc/middle/reachable.rs +++ b/src/librustc/middle/reachable.rs @@ -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; diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index a7669b942e3..33abc0c7e15 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -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)) diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index cfc14b7bfe4..f43f5cf3e3f 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -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}; diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index a5df068dee2..b9e8cd454a0 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -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; diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs index eb392418647..cf2004a681e 100644 --- a/src/librustc/ty/error.rs +++ b/src/librustc/ty/error.rs @@ -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; diff --git a/src/librustc/ty/instance.rs b/src/librustc/ty/instance.rs index 02a03bc542a..ecd415c4bc4 100644 --- a/src/librustc/ty/instance.rs +++ b/src/librustc/ty/instance.rs @@ -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; diff --git a/src/librustc/ty/relate.rs b/src/librustc/ty/relate.rs index 348cf03dd87..03ed6e7ac90 100644 --- a/src/librustc/ty/relate.rs +++ b/src/librustc/ty/relate.rs @@ -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; diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs index 199a46678c8..9b20fce6673 100644 --- a/src/librustc/ty/structural_impls.rs +++ b/src/librustc/ty/structural_impls.rs @@ -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, diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index 92e879a584b..0dfae13cc75 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -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}; diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs index efe83252d0f..905776373bd 100644 --- a/src/librustc/util/ppaux.rs +++ b/src/librustc/util/ppaux.rs @@ -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; diff --git a/src/librustc_allocator/Cargo.toml b/src/librustc_allocator/Cargo.toml index e3d1d8e32c4..765cb80f357 100644 --- a/src/librustc_allocator/Cargo.toml +++ b/src/librustc_allocator/Cargo.toml @@ -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" } diff --git a/src/librustc_allocator/expand.rs b/src/librustc_allocator/expand.rs index 9338d000c12..de8814d3d6a 100644 --- a/src/librustc_allocator/expand.rs +++ b/src/librustc_allocator/expand.rs @@ -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}; diff --git a/src/librustc_allocator/lib.rs b/src/librustc_allocator/lib.rs index 969086815de..6595564fb30 100644 --- a/src/librustc_allocator/lib.rs +++ b/src/librustc_allocator/lib.rs @@ -12,6 +12,7 @@ extern crate rustc; extern crate rustc_errors; +extern crate rustc_target; extern crate syntax; extern crate syntax_pos; diff --git a/src/librustc_cratesio_shim/Cargo.toml b/src/librustc_cratesio_shim/Cargo.toml index 143f88e8f4b..342c7d1b678 100644 --- a/src/librustc_cratesio_shim/Cargo.toml +++ b/src/librustc_cratesio_shim/Cargo.toml @@ -21,3 +21,4 @@ crate-type = ["dylib"] [dependencies] bitflags = "1.0" +log = "0.4" diff --git a/src/librustc_cratesio_shim/src/lib.rs b/src/librustc_cratesio_shim/src/lib.rs index 769b4f57206..85a5b331d8c 100644 --- a/src/librustc_cratesio_shim/src/lib.rs +++ b/src/librustc_cratesio_shim/src/lib.rs @@ -12,3 +12,4 @@ #![allow(unused_extern_crates)] extern crate bitflags; +extern crate log; diff --git a/src/librustc_data_structures/Cargo.toml b/src/librustc_data_structures/Cargo.toml index e1f0a74fc68..9178d0d00fa 100644 --- a/src/librustc_data_structures/Cargo.toml +++ b/src/librustc_data_structures/Cargo.toml @@ -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" diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index ba1d73dc268..1320fe75bc5 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -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; diff --git a/src/librustc_driver/test.rs b/src/librustc_driver/test.rs index 83501f45ec0..47c49fbe9ef 100644 --- a/src/librustc_driver/test.rs +++ b/src/librustc_driver/test.rs @@ -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; diff --git a/src/librustc_lint/Cargo.toml b/src/librustc_lint/Cargo.toml index 5ff891202db..f097095abe4 100644 --- a/src/librustc_lint/Cargo.toml +++ b/src/librustc_lint/Cargo.toml @@ -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" } diff --git a/src/librustc_lint/bad_style.rs b/src/librustc_lint/bad_style.rs index 463ec4796e8..651a2e187f6 100644 --- a/src/librustc_lint/bad_style.rs +++ b/src/librustc_lint/bad_style.rs @@ -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; diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 76991e3e52d..91ce6f3854a 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -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"; diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 889c7d3e34e..65b340d6568 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -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; diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs index 4d2bddd531e..904a3e4c427 100644 --- a/src/librustc_lint/types.rs +++ b/src/librustc_lint/types.rs @@ -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; diff --git a/src/librustc_metadata/link_args.rs b/src/librustc_metadata/link_args.rs index 6fafde0d09c..b699885b0eb 100644 --- a/src/librustc_metadata/link_args.rs +++ b/src/librustc_metadata/link_args.rs @@ -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 { diff --git a/src/librustc_metadata/native_libs.rs b/src/librustc_metadata/native_libs.rs index 4bb6d8fb87c..70b8c7b11fd 100644 --- a/src/librustc_metadata/native_libs.rs +++ b/src/librustc_metadata/native_libs.rs @@ -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}; diff --git a/src/librustc_mir/build/expr/into.rs b/src/librustc_mir/build/expr/into.rs index 28dc329e4fe..c130b4f550f 100644 --- a/src/librustc_mir/build/expr/into.rs +++ b/src/librustc_mir/build/expr/into.rs @@ -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 diff --git a/src/librustc_mir/build/mod.rs b/src/librustc_mir/build/mod.rs index 1dcf1e80041..0d836f5cb97 100644 --- a/src/librustc_mir/build/mod.rs +++ b/src/librustc_mir/build/mod.rs @@ -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; diff --git a/src/librustc_mir/interpret/terminator/mod.rs b/src/librustc_mir/interpret/terminator/mod.rs index 3360e5b72a7..aa80ee7af18 100644 --- a/src/librustc_mir/interpret/terminator/mod.rs +++ b/src/librustc_mir/interpret/terminator/mod.rs @@ -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}; diff --git a/src/librustc_mir/monomorphize/item.rs b/src/librustc_mir/monomorphize/item.rs index 181751f1777..9e0c977a3f0 100644 --- a/src/librustc_mir/monomorphize/item.rs +++ b/src/librustc_mir/monomorphize/item.rs @@ -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("\" "); diff --git a/src/librustc_mir/shim.rs b/src/librustc_mir/shim.rs index 6a0f42c6dbb..af60a83a4a2 100644 --- a/src/librustc_mir/shim.rs +++ b/src/librustc_mir/shim.rs @@ -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; diff --git a/src/librustc_mir/transform/inline.rs b/src/librustc_mir/transform/inline.rs index 2dd805ccf9b..2b491385d66 100644 --- a/src/librustc_mir/transform/inline.rs +++ b/src/librustc_mir/transform/inline.rs @@ -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; diff --git a/src/librustc_mir/transform/qualify_consts.rs b/src/librustc_mir/transform/qualify_consts.rs index 591732fbba9..ff7551ed6f4 100644 --- a/src/librustc_mir/transform/qualify_consts.rs +++ b/src/librustc_mir/transform/qualify_consts.rs @@ -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; diff --git a/src/librustc_mir/transform/rustc_peek.rs b/src/librustc_mir/transform/rustc_peek.rs index 45e7a0d3f4c..8f67b9e7c3d 100644 --- a/src/librustc_mir/transform/rustc_peek.rs +++ b/src/librustc_mir/transform/rustc_peek.rs @@ -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; diff --git a/src/librustc_save_analysis/Cargo.toml b/src/librustc_save_analysis/Cargo.toml index 005faa55b58..976614c9542 100644 --- a/src/librustc_save_analysis/Cargo.toml +++ b/src/librustc_save_analysis/Cargo.toml @@ -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" } diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index 6a747decbd3..401a280412a 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -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; diff --git a/src/librustc_save_analysis/sig.rs b/src/librustc_save_analysis/sig.rs index a9df898efb6..829ed320d75 100644 --- a/src/librustc_save_analysis/sig.rs +++ b/src/librustc_save_analysis/sig.rs @@ -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(' '); diff --git a/src/librustc_target/Cargo.toml b/src/librustc_target/Cargo.toml index 4064cb17f01..bb686e914a0 100644 --- a/src/librustc_target/Cargo.toml +++ b/src/librustc_target/Cargo.toml @@ -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] diff --git a/src/librustc_target/abi/call/mod.rs b/src/librustc_target/abi/call/mod.rs index 3fad7926e1f..34f28301e54 100644 --- a/src/librustc_target/abi/call/mod.rs +++ b/src/librustc_target/abi/call/mod.rs @@ -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); diff --git a/src/librustc_target/lib.rs b/src/librustc_target/lib.rs index c2418a3b2a7..8f491157439 100644 --- a/src/librustc_target/lib.rs +++ b/src/librustc_target/lib.rs @@ -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; diff --git a/src/libsyntax/abi.rs b/src/librustc_target/spec/abi.rs index ed2eb209906..ed2eb209906 100644 --- a/src/libsyntax/abi.rs +++ b/src/librustc_target/spec/abi.rs diff --git a/src/librustc_target/spec/arm_base.rs b/src/librustc_target/spec/arm_base.rs index 416e5a0e13a..635b8ae7388 100644 --- a/src/librustc_target/spec/arm_base.rs +++ b/src/librustc_target/spec/arm_base.rs @@ -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> { diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs index 978ead51b05..1e94f037885 100644 --- a/src/librustc_target/spec/mod.rs +++ b/src/librustc_target/spec/mod.rs @@ -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; diff --git a/src/librustc_trans/abi.rs b/src/librustc_trans/abi.rs index 73c72a15b05..483f36afe27 100644 --- a/src/librustc_trans/abi.rs +++ b/src/librustc_trans/abi.rs @@ -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::*; diff --git a/src/librustc_trans/common.rs b/src/librustc_trans/common.rs index e83e73c8ae7..25ca2152b27 100644 --- a/src/librustc_trans/common.rs +++ b/src/librustc_trans/common.rs @@ -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}; diff --git a/src/librustc_typeck/Cargo.toml b/src/librustc_typeck/Cargo.toml index c7868cc1e95..70c13e9b7d6 100644 --- a/src/librustc_typeck/Cargo.toml +++ b/src/librustc_typeck/Cargo.toml @@ -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" } diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index d657db0b125..6cdce127308 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -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; diff --git a/src/librustc_typeck/check/callee.rs b/src/librustc_typeck/check/callee.rs index 0c95f5eeb43..4df496763e4 100644 --- a/src/librustc_typeck/check/callee.rs +++ b/src/librustc_typeck/check/callee.rs @@ -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; diff --git a/src/librustc_typeck/check/closure.rs b/src/librustc_typeck/check/closure.rs index ed0613860d0..3b9d561ffc5 100644 --- a/src/librustc_typeck/check/closure.rs +++ b/src/librustc_typeck/check/closure.rs @@ -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; diff --git a/src/librustc_typeck/check/intrinsic.rs b/src/librustc_typeck/check/intrinsic.rs index 64b0e7d0a7d..283fbf8fecc 100644 --- a/src/librustc_typeck/check/intrinsic.rs +++ b/src/librustc_typeck/check/intrinsic.rs @@ -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; diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 4083d4a21ef..787df7c6479 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -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}; diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index fb8c6ba6401..2ebbd64cab9 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -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; diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index d29ee3d9b3a..23fe91ffdeb 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -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; diff --git a/src/librustc_typeck/outlives/implicit_infer.rs b/src/librustc_typeck/outlives/implicit_infer.rs index 65c78d3593f..26fba71c812 100644 --- a/src/librustc_typeck/outlives/implicit_infer.rs +++ b/src/librustc_typeck/outlives/implicit_infer.rs @@ -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. diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index e37b3a7fcc4..fb05cbfe32c 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -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}; diff --git a/src/librustdoc/doctree.rs b/src/librustdoc/doctree.rs index 413e5623118..f85a70a6d40 100644 --- a/src/librustdoc/doctree.rs +++ b/src/librustdoc/doctree.rs @@ -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; diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 0a7e19fc643..a9a4c511374 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -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}; diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 0ae946c4182..82449e9b5f9 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -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; diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index a60db29c2f9..614386a583a 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -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; diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index f45a5b030db..967c50e62db 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -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; diff --git a/src/libsyntax/Cargo.toml b/src/libsyntax/Cargo.toml index 8c24f36615b..d1a5ab0211b 100644 --- a/src/libsyntax/Cargo.toml +++ b/src/libsyntax/Cargo.toml @@ -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" } diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 4e3ee241468..cbfcad12f1e 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -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; diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index a9f48342243..0b64189b2bc 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -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}; diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 39ddb13d347..0331e90164f 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -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}; diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index ad98e2a6b71..870ce1926ad 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -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; diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 0397c3297db..ff09c6aa2f0 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -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; diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 9fa3952ca80..324cadc84e8 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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; diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index bd06ae8c1a9..88860df10e2 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -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; diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs index 325927ed832..e2a9f8715e2 100644 --- a/src/libsyntax/test.rs +++ b/src/libsyntax/test.rs @@ -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], diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index 8743840e443..40d59d3ff8b 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -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; diff --git a/src/libsyntax_ext/Cargo.toml b/src/libsyntax_ext/Cargo.toml index d8eeb5ed255..1676757d9b8 100644 --- a/src/libsyntax_ext/Cargo.toml +++ b/src/libsyntax_ext/Cargo.toml @@ -14,4 +14,5 @@ proc_macro = { path = "../libproc_macro" } rustc_errors = { path = "../librustc_errors" } syntax = { path = "../libsyntax" } syntax_pos = { path = "../libsyntax_pos" } -rustc_data_structures = { path = "../librustc_data_structures" } \ No newline at end of file +rustc_data_structures = { path = "../librustc_data_structures" } +rustc_target = { path = "../librustc_target" } \ No newline at end of file diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index 1ef0d2b0b49..becd70149fd 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -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 }; diff --git a/src/libsyntax_ext/lib.rs b/src/libsyntax_ext/lib.rs index 39ad594e5c5..b6721dd28f3 100644 --- a/src/libsyntax_ext/lib.rs +++ b/src/libsyntax_ext/lib.rs @@ -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; |
