Skip to content

Commit aa0cf3c

Browse files
irinagpopaXandkeeper
authored andcommitted
rustc_target: move in syntax::abi and flip dependency.
1 parent f4e197b commit aa0cf3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+106
-77
lines changed

src/Cargo.lock

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/librustc/hir/intravisit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
//! This order consistency is required in a few places in rustc, for
4242
//! example generator inference, and possibly also HIR borrowck.
4343
44-
use syntax::abi::Abi;
44+
use rustc_target::spec::abi::Abi;
4545
use syntax::ast::{NodeId, CRATE_NODE_ID, Name, Attribute};
4646
use syntax_pos::Span;
4747
use hir::*;

src/librustc/hir/map/blocks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use hir as ast;
2525
use hir::map::{self, Node};
2626
use hir::{Expr, FnDecl};
2727
use hir::intravisit::FnKind;
28-
use syntax::abi;
28+
use rustc_target::spec::abi;
2929
use syntax::ast::{Attribute, Name, NodeId};
3030
use syntax_pos::Span;
3131

src/librustc/hir/map/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use hir::def_id::{CRATE_DEF_INDEX, DefId, LocalDefId, DefIndexAddressSpace};
2121

2222
use middle::cstore::CrateStore;
2323

24-
use syntax::abi::Abi;
24+
use rustc_target::spec::abi::Abi;
2525
use syntax::ast::{self, Name, NodeId, CRATE_NODE_ID};
2626
use syntax::codemap::Spanned;
2727
use syntax::ext::base::MacroKind;

src/librustc/hir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use mir::mono::Linkage;
3434

3535
use syntax_pos::{Span, DUMMY_SP};
3636
use syntax::codemap::{self, Spanned};
37-
use syntax::abi::Abi;
37+
use rustc_target::spec::abi::Abi;
3838
use syntax::ast::{self, Name, NodeId, DUMMY_NODE_ID, AsmDialect};
3939
use syntax::ast::{Attribute, Lit, StrStyle, FloatTy, IntTy, UintTy, MetaItem};
4040
use syntax::attr::InlineAttr;

src/librustc/hir/print.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
pub use self::AnnNode::*;
1212

13-
use syntax::abi::Abi;
13+
use rustc_target::spec::abi::Abi;
1414
use syntax::ast;
1515
use syntax::codemap::{CodeMap, Spanned};
1616
use syntax::parse::{token, ParseSess};

src/librustc/ich/impls_syntax.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl_stable_hash_for!(enum ::syntax::ext::base::MacroKind {
8282
});
8383

8484

85-
impl_stable_hash_for!(enum ::syntax::abi::Abi {
85+
impl_stable_hash_for!(enum ::rustc_target::spec::abi::Abi {
8686
Cdecl,
8787
Stdcall,
8888
Fastcall,

src/librustc/middle/intrinsicck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use hir::def_id::DefId;
1313
use ty::{self, Ty, TyCtxt};
1414
use ty::layout::{LayoutError, Pointer, SizeSkeleton};
1515

16-
use syntax::abi::Abi::RustIntrinsic;
16+
use rustc_target::spec::abi::Abi::RustIntrinsic;
1717
use syntax_pos::Span;
1818
use hir::intravisit::{self, Visitor, NestedVisitorMap};
1919
use hir;

src/librustc/middle/reachable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use middle::privacy;
2626
use session::config;
2727
use util::nodemap::{NodeSet, FxHashSet};
2828

29-
use syntax::abi::Abi;
29+
use rustc_target::spec::abi::Abi;
3030
use syntax::ast;
3131
use syntax::attr;
3232
use hir;

src/librustc/traits/error_reporting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,15 +1091,15 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
10911091
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
10921092
false,
10931093
hir::Unsafety::Normal,
1094-
::syntax::abi::Abi::Rust
1094+
::rustc_target::spec::abi::Abi::Rust
10951095
)
10961096
} else {
10971097
tcx.mk_fn_sig(
10981098
::std::iter::once(inputs),
10991099
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
11001100
false,
11011101
hir::Unsafety::Normal,
1102-
::syntax::abi::Abi::Rust
1102+
::rustc_target::spec::abi::Abi::Rust
11031103
)
11041104
};
11051105
format!("{}", ty::Binder::bind(sig))

src/librustc/traits/select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ use std::cmp;
5151
use std::fmt;
5252
use std::mem;
5353
use std::rc::Rc;
54-
use syntax::abi::Abi;
54+
use rustc_target::spec::abi::Abi;
5555
use hir;
5656
use util::nodemap::{FxHashMap, FxHashSet};
5757

src/librustc/ty/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ use std::ops::Deref;
7070
use std::iter;
7171
use std::sync::mpsc;
7272
use std::sync::Arc;
73-
use syntax::abi;
73+
use rustc_target::spec::abi;
7474
use syntax::ast::{self, NodeId};
7575
use syntax::attr;
7676
use syntax::codemap::MultiSpan;

src/librustc/ty/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use hir::def_id::DefId;
1212
use ty::{self, BoundRegion, Region, Ty, TyCtxt};
1313
use std::fmt;
14-
use syntax::abi;
14+
use rustc_target::spec::abi;
1515
use syntax::ast;
1616
use errors::DiagnosticBuilder;
1717
use syntax_pos::Span;

src/librustc/ty/instance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use hir::def_id::DefId;
1212
use ty::{self, Ty, TypeFoldable, Substs, TyCtxt};
1313
use ty::subst::Kind;
1414
use traits;
15-
use syntax::abi::Abi;
15+
use rustc_target::spec::abi::Abi;
1616
use util::ppaux;
1717

1818
use std::fmt;

src/librustc/ty/relate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use mir::interpret::{GlobalId, Value, PrimVal};
2222
use util::common::ErrorReported;
2323
use std::rc::Rc;
2424
use std::iter;
25-
use syntax::abi;
25+
use rustc_target::spec::abi;
2626
use hir as ast;
2727
use rustc_data_structures::accumulate_vec::AccumulateVec;
2828

src/librustc/ty/structural_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ CloneTypeFoldableAndLiftImpls! {
4444
::hir::MatchSource,
4545
::hir::Mutability,
4646
::hir::Unsafety,
47-
::syntax::abi::Abi,
47+
::rustc_target::spec::abi::Abi,
4848
::mir::Local,
4949
::mir::Promoted,
5050
::traits::Reveal,

src/librustc/ty/sty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use util::captures::Captures;
2222

2323
use std::iter;
2424
use std::cmp::Ordering;
25-
use syntax::abi;
25+
use rustc_target::spec::abi;
2626
use syntax::ast::{self, Name};
2727
use syntax::symbol::{keywords, InternedString};
2828

src/librustc/util/ppaux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use std::fmt;
2828
use std::usize;
2929

3030
use rustc_data_structures::indexed_vec::Idx;
31-
use syntax::abi::Abi;
31+
use rustc_target::spec::abi::Abi;
3232
use syntax::ast::CRATE_NODE_ID;
3333
use syntax::symbol::{Symbol, InternedString};
3434
use hir;

src/librustc_allocator/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ test = false
1111
[dependencies]
1212
rustc = { path = "../librustc" }
1313
rustc_errors = { path = "../librustc_errors" }
14+
rustc_target = { path = "../librustc_target" }
1415
syntax = { path = "../libsyntax" }
1516
syntax_pos = { path = "../libsyntax_pos" }

src/librustc_allocator/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

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

src/librustc_allocator/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
extern crate rustc;
1414
extern crate rustc_errors;
15+
extern crate rustc_target;
1516
extern crate syntax;
1617
extern crate syntax_pos;
1718

src/librustc_cratesio_shim/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ crate-type = ["dylib"]
2121

2222
[dependencies]
2323
bitflags = "1.0"
24+
log = "0.4"

src/librustc_cratesio_shim/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
#![allow(unused_extern_crates)]
1313

1414
extern crate bitflags;
15+
extern crate log;

src/librustc_data_structures/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ crate-type = ["dylib"]
1111
[dependencies]
1212
ena = "0.9.1"
1313
log = "0.4"
14+
rustc_cratesio_shim = { path = "../librustc_cratesio_shim" }
1415
serialize = { path = "../libserialize" }
1516
cfg-if = "0.1.2"
1617
stable_deref_trait = "1.0.0"

src/librustc_data_structures/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ extern crate parking_lot;
4545
extern crate cfg_if;
4646
extern crate stable_deref_trait;
4747

48+
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
49+
#[allow(unused_extern_crates)]
50+
extern crate rustc_cratesio_shim;
51+
4852
pub use rustc_serialize::hex::ToHex;
4953

5054
pub mod array_vec;

src/librustc_driver/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use rustc::session::config::{OutputFilenames, OutputTypes};
3131
use rustc_data_structures::sync::{self, Lrc};
3232
use syntax;
3333
use syntax::ast;
34-
use syntax::abi::Abi;
34+
use rustc_target::spec::abi::Abi;
3535
use syntax::codemap::{CodeMap, FilePathMapping, FileName};
3636
use errors;
3737
use errors::emitter::Emitter;

src/librustc_lint/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ test = false
1313
log = "0.4"
1414
rustc = { path = "../librustc" }
1515
rustc_mir = { path = "../librustc_mir"}
16+
rustc_target = { path = "../librustc_target" }
1617
syntax = { path = "../libsyntax" }
1718
syntax_pos = { path = "../libsyntax_pos" }

src/librustc_lint/bad_style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc::ty;
1313
use lint::{LateContext, LintContext, LintArray};
1414
use lint::{LintPass, LateLintPass};
1515

16-
use syntax::abi::Abi;
16+
use rustc_target::spec::abi::Abi;
1717
use syntax::ast;
1818
use syntax::attr;
1919
use syntax_pos::Span;

src/librustc_lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ impl LintPass for MutableTransmutes {
11691169

11701170
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MutableTransmutes {
11711171
fn check_expr(&mut self, cx: &LateContext, expr: &hir::Expr) {
1172-
use syntax::abi::Abi::RustIntrinsic;
1172+
use rustc_target::spec::abi::Abi::RustIntrinsic;
11731173

11741174
let msg = "mutating transmuted &mut T from &T may cause undefined behavior, \
11751175
consider instead using an UnsafeCell";

src/librustc_lint/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ extern crate rustc;
3737
#[macro_use]
3838
extern crate log;
3939
extern crate rustc_mir;
40+
extern crate rustc_target;
4041
extern crate syntax_pos;
4142

4243
use rustc::lint;

src/librustc_lint/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::cmp;
2222
use std::{i8, i16, i32, i64, u8, u16, u32, u64, f32, f64};
2323

2424
use syntax::{ast, attr};
25-
use syntax::abi::Abi;
25+
use rustc_target::spec::abi::Abi;
2626
use syntax_pos::Span;
2727
use syntax::codemap;
2828

src/librustc_metadata/link_args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use rustc::hir::itemlikevisit::ItemLikeVisitor;
1212
use rustc::hir;
1313
use rustc::ty::TyCtxt;
14-
use syntax::abi::Abi;
14+
use rustc_target::spec::abi::Abi;
1515

1616
pub fn collect<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Vec<String> {
1717
let mut collector = Collector {

src/librustc_metadata/native_libs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use rustc::middle::cstore::{self, NativeLibrary};
1414
use rustc::session::Session;
1515
use rustc::ty::TyCtxt;
1616
use rustc::util::nodemap::FxHashSet;
17-
use syntax::abi::Abi;
17+
use rustc_target::spec::abi::Abi;
1818
use syntax::attr;
1919
use syntax::codemap::Span;
2020
use syntax::feature_gate::{self, GateIssue};

src/librustc_mir/build/expr/into.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use hair::*;
1616
use rustc::ty;
1717
use rustc::mir::*;
1818

19-
use syntax::abi::Abi;
19+
use rustc_target::spec::abi::Abi;
2020

2121
impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
2222
/// Compile `expr`, storing the result into `destination`, which

src/librustc_mir/build/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use rustc_data_structures::indexed_vec::{IndexVec, Idx};
2525
use shim;
2626
use std::mem;
2727
use std::u32;
28-
use syntax::abi::Abi;
28+
use rustc_target::spec::abi::Abi;
2929
use syntax::ast;
3030
use syntax::attr::{self, UnwindAttr};
3131
use syntax::symbol::keywords;

src/librustc_mir/interpret/terminator/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use rustc::mir;
22
use rustc::ty::{self, Ty};
33
use rustc::ty::layout::LayoutOf;
44
use syntax::codemap::Span;
5-
use syntax::abi::Abi;
5+
use rustc_target::spec::abi::Abi;
66

77
use rustc::mir::interpret::{EvalResult, PrimVal, Value};
88
use super::{EvalContext, Place, Machine, ValTy};

src/librustc_mir/monomorphize/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ impl<'a, 'tcx> DefPathBasedNames<'a, 'tcx> {
339339
}
340340

341341
let abi = sig.abi();
342-
if abi != ::syntax::abi::Abi::Rust {
342+
if abi != ::rustc_target::spec::abi::Abi::Rust {
343343
output.push_str("extern \"");
344344
output.push_str(abi.name());
345345
output.push_str("\" ");

0 commit comments

Comments
 (0)