From da66431d06b961efd323f25978964df54d44d3c4 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Tue, 23 Feb 2016 22:43:04 +0200 Subject: [PATCH] trans: Combine cabi and back::abi into abi. --- src/librustc/lib.rs | 1 - src/librustc_back/abi.rs | 24 ------------------- src/librustc_back/lib.rs | 1 - src/librustc_trans/lib.rs | 1 - src/librustc_trans/trans/{cabi.rs => abi.rs} | 18 +++++++++++--- src/librustc_trans/trans/adt.rs | 2 +- src/librustc_trans/trans/attributes.rs | 2 +- src/librustc_trans/trans/base.rs | 4 ++-- src/librustc_trans/trans/cabi_aarch64.rs | 2 +- src/librustc_trans/trans/cabi_arm.rs | 2 +- src/librustc_trans/trans/cabi_asmjs.rs | 2 +- src/librustc_trans/trans/cabi_mips.rs | 2 +- src/librustc_trans/trans/cabi_powerpc.rs | 2 +- src/librustc_trans/trans/cabi_powerpc64.rs | 2 +- src/librustc_trans/trans/cabi_x86.rs | 2 +- src/librustc_trans/trans/cabi_x86_64.rs | 2 +- src/librustc_trans/trans/cabi_x86_win64.rs | 2 +- src/librustc_trans/trans/callee.rs | 2 +- src/librustc_trans/trans/closure.rs | 2 +- src/librustc_trans/trans/collector.rs | 2 +- src/librustc_trans/trans/common.rs | 2 +- src/librustc_trans/trans/consts.rs | 3 +-- src/librustc_trans/trans/debuginfo/mod.rs | 2 +- .../trans/debuginfo/type_names.rs | 2 +- src/librustc_trans/trans/declare.rs | 3 +-- src/librustc_trans/trans/expr.rs | 3 +-- src/librustc_trans/trans/foreign.rs | 8 ++----- src/librustc_trans/trans/intrinsic.rs | 2 +- src/librustc_trans/trans/mir/block.rs | 2 +- src/librustc_trans/trans/mir/constant.rs | 2 +- src/librustc_trans/trans/mod.rs | 2 +- src/librustc_trans/trans/monomorphize.rs | 2 +- src/librustc_trans/trans/type_of.rs | 3 +-- 33 files changed, 45 insertions(+), 68 deletions(-) delete mode 100644 src/librustc_back/abi.rs rename src/librustc_trans/trans/{cabi.rs => abi.rs} (93%) diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 3988545c201..d2ca1cd3f93 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -73,7 +73,6 @@ pub mod diagnostics; pub mod back { - pub use rustc_back::abi; pub use rustc_back::rpath; pub use rustc_back::svh; } diff --git a/src/librustc_back/abi.rs b/src/librustc_back/abi.rs deleted file mode 100644 index c3a3a8d582a..00000000000 --- a/src/librustc_back/abi.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -pub const BOX_FIELD_DROP_GLUE: usize = 1; -pub const BOX_FIELD_BODY: usize = 4; - -/// The first half of a fat pointer. -/// - For a closure, this is the code address. -/// - For an object or trait instance, this is the address of the box. -/// - For a slice, this is the base address. -pub const FAT_PTR_ADDR: usize = 0; - -/// The second half of a fat pointer. -/// - For a closure, this is the address of the environment. -/// - For an object or trait instance, this is the address of the vtable. -/// - For a slice, this is the length. -pub const FAT_PTR_EXTRA: usize = 1; diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs index 2b677d665d4..3ffc031d621 100644 --- a/src/librustc_back/lib.rs +++ b/src/librustc_back/lib.rs @@ -48,7 +48,6 @@ extern crate rustc_front; #[macro_use] extern crate log; -pub mod abi; pub mod tempdir; pub mod rpath; pub mod sha2; diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index d7e79e46720..c8ce09b4d79 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -61,7 +61,6 @@ pub use rustc::util; pub mod back { - pub use rustc_back::abi; pub use rustc_back::rpath; pub use rustc_back::svh; diff --git a/src/librustc_trans/trans/cabi.rs b/src/librustc_trans/trans/abi.rs similarity index 93% rename from src/librustc_trans/trans/cabi.rs rename to src/librustc_trans/trans/abi.rs index 5325c667eb6..9aabceb6b0e 100644 --- a/src/librustc_trans/trans/cabi.rs +++ b/src/librustc_trans/trans/abi.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -28,7 +28,19 @@ use middle::ty::{self, Ty}; -use syntax::abi::Abi; +pub use syntax::abi::Abi; + +/// The first half of a fat pointer. +/// - For a closure, this is the code address. +/// - For an object or trait instance, this is the address of the box. +/// - For a slice, this is the base address. +pub const FAT_PTR_ADDR: usize = 0; + +/// The second half of a fat pointer. +/// - For a closure, this is the address of the environment. +/// - For an object or trait instance, this is the address of the vtable. +/// - For a slice, this is the length. +pub const FAT_PTR_EXTRA: usize = 1; #[derive(Clone, Copy, PartialEq, Debug)] pub enum ArgKind { @@ -130,7 +142,7 @@ pub fn new<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, abi: Abi, sig: &ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> FnType { - use syntax::abi::Abi::*; + use self::Abi::*; let cconv = match ccx.sess().target.target.adjust_abi(abi) { RustIntrinsic => { // Intrinsics are emitted at the call site diff --git a/src/librustc_trans/trans/adt.rs b/src/librustc_trans/trans/adt.rs index c6c19a2a6c7..798fbbe8fbf 100644 --- a/src/librustc_trans/trans/adt.rs +++ b/src/librustc_trans/trans/adt.rs @@ -48,13 +48,13 @@ use std::rc::Rc; use llvm::{ValueRef, True, IntEQ, IntNE}; -use back::abi::FAT_PTR_ADDR; use middle::subst; use middle::ty::{self, Ty, TyCtxt}; use syntax::ast; use syntax::attr; use syntax::attr::IntType; use trans::_match; +use trans::abi::FAT_PTR_ADDR; use trans::base::InitAlloca; use trans::build::*; use trans::cleanup; diff --git a/src/librustc_trans/trans/attributes.rs b/src/librustc_trans/trans/attributes.rs index d93d32f8e0d..4bb2b13998f 100644 --- a/src/librustc_trans/trans/attributes.rs +++ b/src/librustc_trans/trans/attributes.rs @@ -15,10 +15,10 @@ use middle::infer; use middle::traits::ProjectionMode; use session::config::NoDebugInfo; -use syntax::abi::Abi; pub use syntax::attr::InlineAttr; use syntax::ast; use rustc_front::hir; +use trans::abi::Abi; use trans::base; use trans::common; use trans::context::CrateContext; diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs index d177bb396c9..69b296edd30 100644 --- a/src/librustc_trans/trans/base.rs +++ b/src/librustc_trans/trans/base.rs @@ -30,7 +30,7 @@ use super::ModuleTranslation; use back::link::mangle_exported_name; -use back::{link, abi}; +use back::link; use lint; use llvm::{BasicBlockRef, Linkage, ValueRef, Vector, get_param}; use llvm; @@ -52,6 +52,7 @@ use session::config::{self, NoDebugInfo, FullDebugInfo}; use session::Session; use trans::_match; +use trans::abi::{self, Abi}; use trans::adt; use trans::assert_dep_graph; use trans::attributes; @@ -100,7 +101,6 @@ use std::collections::{HashMap, HashSet}; use std::str; use std::{i8, i16, i32, i64}; -use syntax::abi::Abi; use syntax::codemap::{Span, DUMMY_SP}; use syntax::parse::token::InternedString; use syntax::attr::AttrMetaMethods; diff --git a/src/librustc_trans/trans/cabi_aarch64.rs b/src/librustc_trans/trans/cabi_aarch64.rs index 745cc3ba6d6..1004505b3c4 100644 --- a/src/librustc_trans/trans/cabi_aarch64.rs +++ b/src/librustc_trans/trans/cabi_aarch64.rs @@ -11,7 +11,7 @@ #![allow(non_upper_case_globals)] use llvm::{Integer, Pointer, Float, Double, Struct, Array, Vector, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_arm.rs b/src/librustc_trans/trans/cabi_arm.rs index c65fb588e72..12d6aa6341a 100644 --- a/src/librustc_trans/trans/cabi_arm.rs +++ b/src/librustc_trans/trans/cabi_arm.rs @@ -11,7 +11,7 @@ #![allow(non_upper_case_globals)] use llvm::{Integer, Pointer, Float, Double, Struct, Array, Vector, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_asmjs.rs b/src/librustc_trans/trans/cabi_asmjs.rs index dd62194a892..752a7f3ca5c 100644 --- a/src/librustc_trans/trans/cabi_asmjs.rs +++ b/src/librustc_trans/trans/cabi_asmjs.rs @@ -11,7 +11,7 @@ #![allow(non_upper_case_globals)] use llvm::{Struct, Array, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_mips.rs b/src/librustc_trans/trans/cabi_mips.rs index 74fdc0828f2..1bab2f6e9ae 100644 --- a/src/librustc_trans/trans/cabi_mips.rs +++ b/src/librustc_trans/trans/cabi_mips.rs @@ -14,7 +14,7 @@ use std::cmp; use llvm; use llvm::{Integer, Pointer, Float, Double, Struct, Array, Vector, Attribute}; -use trans::cabi::{ArgType, FnType}; +use trans::abi::{ArgType, FnType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_powerpc.rs b/src/librustc_trans/trans/cabi_powerpc.rs index 57d49926fae..0239f9fe928 100644 --- a/src/librustc_trans/trans/cabi_powerpc.rs +++ b/src/librustc_trans/trans/cabi_powerpc.rs @@ -11,7 +11,7 @@ use libc::c_uint; use llvm; use llvm::{Integer, Pointer, Float, Double, Struct, Array, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_powerpc64.rs b/src/librustc_trans/trans/cabi_powerpc64.rs index dd50b116451..842171c0d73 100644 --- a/src/librustc_trans/trans/cabi_powerpc64.rs +++ b/src/librustc_trans/trans/cabi_powerpc64.rs @@ -16,7 +16,7 @@ // need to be fixed when PowerPC vector support is added. use llvm::{Integer, Pointer, Float, Double, Struct, Array, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_x86.rs b/src/librustc_trans/trans/cabi_x86.rs index 81fb9d71210..256e656b9b6 100644 --- a/src/librustc_trans/trans/cabi_x86.rs +++ b/src/librustc_trans/trans/cabi_x86.rs @@ -9,7 +9,7 @@ // except according to those terms. use llvm::*; -use trans::cabi::{ArgType, FnType}; +use trans::abi::{ArgType, FnType}; use trans::type_::Type; use super::common::*; use super::machine::*; diff --git a/src/librustc_trans/trans/cabi_x86_64.rs b/src/librustc_trans/trans/cabi_x86_64.rs index 5946aa4a8c3..12fd31cc96e 100644 --- a/src/librustc_trans/trans/cabi_x86_64.rs +++ b/src/librustc_trans/trans/cabi_x86_64.rs @@ -16,7 +16,7 @@ use llvm::{Integer, Pointer, Float, Double}; use llvm::{Struct, Array, Attribute, Vector}; -use trans::cabi::{ArgType, FnType}; +use trans::abi::{ArgType, FnType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_x86_win64.rs b/src/librustc_trans/trans/cabi_x86_win64.rs index 21c746a1e88..7e887b2ad70 100644 --- a/src/librustc_trans/trans/cabi_x86_win64.rs +++ b/src/librustc_trans/trans/cabi_x86_win64.rs @@ -11,7 +11,7 @@ use llvm::*; use super::common::*; use super::machine::*; -use trans::cabi::{ArgType, FnType}; +use trans::abi::{ArgType, FnType}; use trans::type_::Type; // Win64 ABI: http://msdn.microsoft.com/en-us/library/zthk2dkh.aspx diff --git a/src/librustc_trans/trans/callee.rs b/src/librustc_trans/trans/callee.rs index 65724405db1..4c5386799e9 100644 --- a/src/librustc_trans/trans/callee.rs +++ b/src/librustc_trans/trans/callee.rs @@ -27,6 +27,7 @@ use middle::subst::{Substs}; use middle::traits; use rustc::front::map as hir_map; +use trans::abi::Abi; use trans::adt; use trans::attributes; use trans::base; @@ -54,7 +55,6 @@ use middle::ty::{self, Ty, TyCtxt, TypeFoldable}; use rustc_front::hir; -use syntax::abi::Abi; use syntax::ast; use syntax::codemap::DUMMY_SP; use syntax::errors; diff --git a/src/librustc_trans/trans/closure.rs b/src/librustc_trans/trans/closure.rs index bc81b32ae45..d4272e79185 100644 --- a/src/librustc_trans/trans/closure.rs +++ b/src/librustc_trans/trans/closure.rs @@ -14,6 +14,7 @@ use middle::def_id::DefId; use middle::infer; use middle::traits::ProjectionMode; +use trans::abi::Abi::RustCall; use trans::adt; use trans::attributes; use trans::base::*; @@ -32,7 +33,6 @@ use middle::ty; use session::config::FullDebugInfo; -use syntax::abi::Abi::RustCall; use syntax::ast; use syntax::attr::{ThinAttributes, ThinAttributesExt}; diff --git a/src/librustc_trans/trans/collector.rs b/src/librustc_trans/trans/collector.rs index 43d3cde0f68..3170ee0bf48 100644 --- a/src/librustc_trans/trans/collector.rs +++ b/src/librustc_trans/trans/collector.rs @@ -1261,7 +1261,7 @@ pub fn push_unique_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, output.push_str("unsafe "); } - if abi != ::syntax::abi::Abi::Rust { + if abi != ::trans::abi::Abi::Rust { output.push_str("extern \""); output.push_str(abi.name()); output.push_str("\" "); diff --git a/src/librustc_trans/trans/common.rs b/src/librustc_trans/trans/common.rs index 655a57b6f20..b9f9004d7ee 100644 --- a/src/librustc_trans/trans/common.rs +++ b/src/librustc_trans/trans/common.rs @@ -22,6 +22,7 @@ use middle::infer; use middle::lang_items::LangItem; use middle::subst::Substs; +use trans::abi::Abi; use trans::base; use trans::build; use trans::builder::Builder; @@ -49,7 +50,6 @@ use std::ffi::CString; use std::cell::{Cell, RefCell}; -use syntax::abi::Abi; use syntax::ast; use syntax::codemap::{DUMMY_SP, Span}; use syntax::parse::token::InternedString; diff --git a/src/librustc_trans/trans/consts.rs b/src/librustc_trans/trans/consts.rs index f2b68c477f6..31ad7054996 100644 --- a/src/librustc_trans/trans/consts.rs +++ b/src/librustc_trans/trans/consts.rs @@ -9,7 +9,6 @@ // except according to those terms. -use back::abi; use llvm; use llvm::{ConstFCmp, ConstICmp, SetLinkage, SetUnnamedAddr}; use llvm::{InternalLinkage, ValueRef, Bool, True}; @@ -19,7 +18,7 @@ use middle::def::Def; use middle::def_id::DefId; use rustc::front::map as hir_map; -use trans::{adt, closure, debuginfo, expr, inline, machine}; +use trans::{abi, adt, closure, debuginfo, expr, inline, machine}; use trans::base::{self, exported_name, push_ctxt}; use trans::callee::Callee; use trans::collector::{self, TransItem}; diff --git a/src/librustc_trans/trans/debuginfo/mod.rs b/src/librustc_trans/trans/debuginfo/mod.rs index 15275a46e9b..e9a6aed7008 100644 --- a/src/librustc_trans/trans/debuginfo/mod.rs +++ b/src/librustc_trans/trans/debuginfo/mod.rs @@ -32,6 +32,7 @@ use rustc_front; use rustc_front::hir; +use trans::abi::Abi; use trans::common::{NodeIdAndSpan, CrateContext, FunctionContext, Block}; use trans; use trans::{monomorphize, type_of}; @@ -49,7 +50,6 @@ use syntax::codemap::{Span, Pos}; use syntax::{ast, codemap}; -use syntax::abi::Abi; use syntax::attr::IntType; use syntax::parse::token::{self, special_idents}; diff --git a/src/librustc_trans/trans/debuginfo/type_names.rs b/src/librustc_trans/trans/debuginfo/type_names.rs index cc9067677b2..b71b7789aff 100644 --- a/src/librustc_trans/trans/debuginfo/type_names.rs +++ b/src/librustc_trans/trans/debuginfo/type_names.rs @@ -107,7 +107,7 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, output.push_str("unsafe "); } - if abi != ::syntax::abi::Abi::Rust { + if abi != ::trans::abi::Abi::Rust { output.push_str("extern \""); output.push_str(abi.name()); output.push_str("\" "); diff --git a/src/librustc_trans/trans/declare.rs b/src/librustc_trans/trans/declare.rs index d77fd6f10a0..848ed2c1211 100644 --- a/src/librustc_trans/trans/declare.rs +++ b/src/librustc_trans/trans/declare.rs @@ -23,10 +23,9 @@ use middle::ty; use middle::infer; use middle::traits::ProjectionMode; -use syntax::abi::Abi; +use trans::abi::{Abi, FnType}; use trans::attributes; use trans::base; -use trans::cabi::FnType; use trans::context::CrateContext; use trans::type_::Type; use trans::type_of; diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs index 102732eb1dc..6ea407e7b44 100644 --- a/src/librustc_trans/trans/expr.rs +++ b/src/librustc_trans/trans/expr.rs @@ -51,12 +51,11 @@ pub use self::Dest::*; use self::lazy_binop_ty::*; -use back::abi; use llvm::{self, ValueRef, TypeKind}; use middle::const_qualif::ConstQualif; use middle::def::Def; use middle::subst::Substs; -use trans::{_match, adt, asm, base, closure, consts, controlflow}; +use trans::{_match, abi, adt, asm, base, closure, consts, controlflow}; use trans::base::*; use trans::build::*; use trans::callee::{Callee, ArgExprs, ArgOverloadedCall, ArgOverloadedOp}; diff --git a/src/librustc_trans/trans/foreign.rs b/src/librustc_trans/trans/foreign.rs index 0c8ac32ecc1..0cf30aca94c 100644 --- a/src/librustc_trans/trans/foreign.rs +++ b/src/librustc_trans/trans/foreign.rs @@ -9,15 +9,15 @@ // except according to those terms. -use back::{abi, link}; +use back::link; use llvm::{ValueRef, get_param}; use llvm; use middle::weak_lang_items; +use trans::abi::{self, Abi, FnType}; use trans::attributes; use trans::base::{llvm_linkage_by_name, push_ctxt}; use trans::base; use trans::build::*; -use trans::cabi::FnType; use trans::common::*; use trans::debuginfo::DebugLoc; use trans::declare; @@ -35,7 +35,6 @@ use std::cmp; use std::iter::once; use libc::c_uint; -use syntax::abi::Abi; use syntax::attr; use syntax::parse::token::{InternedString, special_idents}; use syntax::ast; @@ -715,7 +714,4 @@ pub fn link_name(name: ast::Name, attrs: &[ast::Attribute]) -> InternedString { None => name.as_str(), } } -} - } - } } diff --git a/src/librustc_trans/trans/intrinsic.rs b/src/librustc_trans/trans/intrinsic.rs index 707d60e18a9..edca908e7ba 100644 --- a/src/librustc_trans/trans/intrinsic.rs +++ b/src/librustc_trans/trans/intrinsic.rs @@ -18,6 +18,7 @@ use middle::infer; use middle::subst; use middle::subst::FnSpace; +use trans::abi::Abi; use trans::adt; use trans::attributes; use trans::base::*; @@ -40,7 +41,6 @@ use middle::subst::Substs; use rustc::dep_graph::DepNode; use rustc_front::hir; -use syntax::abi::Abi; use syntax::ast; use syntax::ptr::P; use syntax::parse::token; diff --git a/src/librustc_trans/trans/mir/block.rs b/src/librustc_trans/trans/mir/block.rs index 1bbb2447e6a..00babf6792f 100644 --- a/src/librustc_trans/trans/mir/block.rs +++ b/src/librustc_trans/trans/mir/block.rs @@ -11,7 +11,7 @@ use llvm::{BasicBlockRef, ValueRef, OperandBundleDef}; use rustc::middle::ty; use rustc::mir::repr as mir; -use syntax::abi::Abi; +use trans::abi::Abi; use trans::adt; use trans::attributes; use trans::base; diff --git a/src/librustc_trans/trans/mir/constant.rs b/src/librustc_trans/trans/mir/constant.rs index 52a4995f594..21cd35ea045 100644 --- a/src/librustc_trans/trans/mir/constant.rs +++ b/src/librustc_trans/trans/mir/constant.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use back::abi; use llvm::ValueRef; use middle::ty::{Ty, TypeFoldable}; use rustc::middle::const_eval::{self, ConstVal}; use rustc_const_eval::ConstInt::*; use rustc::mir::repr as mir; +use trans::abi; use trans::common::{self, BlockAndBuilder, C_bool, C_bytes, C_floating_f64, C_integral, C_str_slice, C_nil, C_undef}; use trans::consts; diff --git a/src/librustc_trans/trans/mod.rs b/src/librustc_trans/trans/mod.rs index 9d197742c1b..ff5ed35b8c0 100644 --- a/src/librustc_trans/trans/mod.rs +++ b/src/librustc_trans/trans/mod.rs @@ -19,6 +19,7 @@ #[macro_use] mod macros; +mod abi; mod adt; mod asm; mod assert_dep_graph; @@ -27,7 +28,6 @@ mod basic_block; mod build; mod builder; -mod cabi; mod cabi_aarch64; mod cabi_arm; mod cabi_asmjs; diff --git a/src/librustc_trans/trans/monomorphize.rs b/src/librustc_trans/trans/monomorphize.rs index fcbf0bdf790..07dba8e6cc3 100644 --- a/src/librustc_trans/trans/monomorphize.rs +++ b/src/librustc_trans/trans/monomorphize.rs @@ -16,6 +16,7 @@ use middle::subst; use middle::subst::{Subst, Substs}; use middle::ty::fold::{TypeFolder, TypeFoldable}; +use trans::abi::Abi; use trans::attributes; use trans::base::{push_ctxt}; use trans::base::trans_fn; @@ -30,7 +31,6 @@ use rustc_front::hir; -use syntax::abi::Abi; use syntax::attr; use syntax::errors; diff --git a/src/librustc_trans/trans/type_of.rs b/src/librustc_trans/trans/type_of.rs index ee2d84a7be7..b3beecfb9b8 100644 --- a/src/librustc_trans/trans/type_of.rs +++ b/src/librustc_trans/trans/type_of.rs @@ -13,15 +13,14 @@ use middle::def_id::DefId; use middle::infer; use middle::subst; +use trans::abi::{Abi, FnType}; use trans::adt; -use trans::cabi::FnType; use trans::common::*; use trans::machine; use middle::ty::{self, Ty, TypeFoldable}; use trans::type_::Type; -use syntax::abi::Abi; use syntax::ast; // LLVM doesn't like objects that are too big. Issue #17913 -- GitLab