mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
Auto merge of #32432 - eddyb:dock-service, r=nikomatsakis
Flatten rustc and rustc_trans module hierarchy slightly. The following moves were made, in the name of sanity/simplicity: * `rustc::middle::{cfg, infer, traits, ty}` to `rustc::{cfg, infer, traits, ty}` * `rustc::middle::subst` to `rustc::ty::subst` * `rustc_trans::trans::*` to `rustc_trans::*` * `rustc_trans::save` to `rustc_save_analysis` (cc @nrc) I've rebased a larger WIP branch on top of this and the only conflicts were in imports, but YMMV.
This commit is contained in:
commit
d5a91e6958
@ -57,7 +57,7 @@ TARGET_CRATES := libc std term \
|
||||
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
|
||||
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
|
||||
rustc_data_structures rustc_front rustc_platform_intrinsics \
|
||||
rustc_plugin rustc_metadata rustc_passes
|
||||
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis
|
||||
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
|
||||
flate arena graphviz rbml log serialize
|
||||
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
|
||||
@ -102,7 +102,7 @@ DEPS_rustc_data_structures := std log serialize
|
||||
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
|
||||
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
|
||||
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
|
||||
rustc_metadata syntax_ext rustc_passes
|
||||
rustc_metadata syntax_ext rustc_passes rustc_save_analysis
|
||||
DEPS_rustc_front := std syntax log serialize
|
||||
DEPS_rustc_lint := rustc log syntax
|
||||
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
|
||||
@ -116,6 +116,7 @@ DEPS_rustc_privacy := rustc rustc_front log syntax
|
||||
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
|
||||
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
|
||||
rustc_const_eval
|
||||
DEPS_rustc_save_analysis := rustc log syntax rustc_front
|
||||
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
|
||||
|
||||
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
|
||||
|
@ -9,10 +9,10 @@
|
||||
// except according to those terms.
|
||||
|
||||
use rustc_data_structures::graph;
|
||||
use middle::cfg::*;
|
||||
use cfg::*;
|
||||
use middle::def::Def;
|
||||
use middle::pat_util;
|
||||
use middle::ty::{self, TyCtxt};
|
||||
use ty::{self, TyCtxt};
|
||||
use syntax::ast;
|
||||
use syntax::ptr::P;
|
||||
|
@ -18,7 +18,7 @@ use graphviz::IntoCow;
|
||||
use syntax::ast;
|
||||
|
||||
use front::map as ast_map;
|
||||
use middle::cfg;
|
||||
use cfg;
|
||||
|
||||
pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);
|
||||
pub type Edge<'a> = &'a cfg::CFGEdge;
|
@ -12,7 +12,7 @@
|
||||
//! Uses `Graph` as the underlying representation.
|
||||
|
||||
use rustc_data_structures::graph;
|
||||
use middle::ty::TyCtxt;
|
||||
use ty::TyCtxt;
|
||||
use syntax::ast;
|
||||
use rustc_front::hir;
|
||||
|
@ -11,7 +11,7 @@
|
||||
use self::thread::{DepGraphThreadData, DepMessage};
|
||||
use middle::def_id::DefId;
|
||||
use syntax::ast::NodeId;
|
||||
use middle::ty::TyCtxt;
|
||||
use ty::TyCtxt;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use std::rc::Rc;
|
||||
|
@ -28,9 +28,9 @@
|
||||
use super::combine::{self, CombineFields};
|
||||
use super::type_variable::{BiTo};
|
||||
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::TyVar;
|
||||
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::TyVar;
|
||||
use ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
|
||||
pub struct Bivariate<'a, 'tcx: 'a> {
|
||||
fields: CombineFields<'a, 'tcx>
|
@ -41,11 +41,11 @@ use super::{InferCtxt};
|
||||
use super::{MiscVariable, TypeTrace};
|
||||
use super::type_variable::{RelationDir, BiTo, EqTo, SubtypeOf, SupertypeOf};
|
||||
|
||||
use middle::ty::{IntType, UintType};
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::error::TypeError;
|
||||
use middle::ty::fold::{TypeFolder, TypeFoldable};
|
||||
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use ty::{IntType, UintType};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::error::TypeError;
|
||||
use ty::fold::{TypeFolder, TypeFoldable};
|
||||
use ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
@ -13,9 +13,9 @@ use super::higher_ranked::HigherRankedRelations;
|
||||
use super::{Subtype};
|
||||
use super::type_variable::{EqTo};
|
||||
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::TyVar;
|
||||
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::TyVar;
|
||||
use ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
|
||||
/// Ensures `a` is made equal to `b`. Returns `a` on success.
|
||||
pub struct Equate<'a, 'tcx: 'a> {
|
@ -80,12 +80,12 @@ use rustc_front::print::pprust;
|
||||
use middle::cstore::CrateStore;
|
||||
use middle::def::Def;
|
||||
use middle::def_id::DefId;
|
||||
use middle::infer::{self, TypeOrigin};
|
||||
use infer::{self, TypeOrigin};
|
||||
use middle::region;
|
||||
use middle::subst;
|
||||
use middle::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use middle::ty::{Region, ReFree};
|
||||
use middle::ty::error::TypeError;
|
||||
use ty::subst;
|
||||
use ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use ty::{Region, ReFree};
|
||||
use ty::error::TypeError;
|
||||
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::char::from_u32;
|
@ -30,8 +30,8 @@
|
||||
//! variable only once, and it does so as soon as it can, so it is reasonable to ask what the type
|
||||
//! inferencer knows "so far".
|
||||
|
||||
use middle::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use middle::ty::fold::TypeFolder;
|
||||
use ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use ty::fold::TypeFolder;
|
||||
use std::collections::hash_map::{self, Entry};
|
||||
|
||||
use super::InferCtxt;
|
@ -14,8 +14,8 @@ use super::InferCtxt;
|
||||
use super::lattice::{self, LatticeDir};
|
||||
use super::Subtype;
|
||||
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
|
||||
/// "Greatest lower bound" (common subtype)
|
||||
pub struct Glb<'a, 'tcx: 'a> {
|
@ -14,9 +14,9 @@
|
||||
use super::{CombinedSnapshot, InferCtxt, HigherRankedType, SkolemizationMap};
|
||||
use super::combine::CombineFields;
|
||||
|
||||
use middle::ty::{self, TyCtxt, Binder, TypeFoldable};
|
||||
use middle::ty::error::TypeError;
|
||||
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use ty::{self, TyCtxt, Binder, TypeFoldable};
|
||||
use ty::error::TypeError;
|
||||
use ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use syntax::codemap::Span;
|
||||
use util::nodemap::{FnvHashMap, FnvHashSet};
|
||||
|
@ -32,9 +32,9 @@
|
||||
use super::combine;
|
||||
use super::InferCtxt;
|
||||
|
||||
use middle::ty::TyVar;
|
||||
use middle::ty::{self, Ty};
|
||||
use middle::ty::relate::{RelateResult, TypeRelation};
|
||||
use ty::TyVar;
|
||||
use ty::{self, Ty};
|
||||
use ty::relate::{RelateResult, TypeRelation};
|
||||
|
||||
pub trait LatticeDir<'f,'tcx> : TypeRelation<'f,'tcx> {
|
||||
fn infcx(&self) -> &'f InferCtxt<'f, 'tcx>;
|
@ -14,8 +14,8 @@ use super::InferCtxt;
|
||||
use super::lattice::{self, LatticeDir};
|
||||
use super::Subtype;
|
||||
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
|
||||
/// "Least upper bound" (common supertype)
|
||||
pub struct Lub<'a, 'tcx: 'a> {
|
@ -14,7 +14,7 @@ pub use self::LateBoundRegionConversionTime::*;
|
||||
pub use self::RegionVariableOrigin::*;
|
||||
pub use self::SubregionOrigin::*;
|
||||
pub use self::ValuePairs::*;
|
||||
pub use middle::ty::IntVarValue;
|
||||
pub use ty::IntVarValue;
|
||||
pub use self::freshen::TypeFreshener;
|
||||
pub use self::region_inference::{GenericKind, VerifyBound};
|
||||
|
||||
@ -24,16 +24,16 @@ use middle::free_region::FreeRegionMap;
|
||||
use middle::mem_categorization as mc;
|
||||
use middle::mem_categorization::McResult;
|
||||
use middle::region::CodeExtent;
|
||||
use middle::subst;
|
||||
use middle::subst::Substs;
|
||||
use middle::subst::Subst;
|
||||
use middle::traits::{self, ProjectionMode};
|
||||
use middle::ty::adjustment;
|
||||
use middle::ty::{TyVid, IntVid, FloatVid};
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::error::{ExpectedFound, TypeError, UnconstrainedNumeric};
|
||||
use middle::ty::fold::{TypeFolder, TypeFoldable};
|
||||
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use ty::subst;
|
||||
use ty::subst::Substs;
|
||||
use ty::subst::Subst;
|
||||
use traits::{self, ProjectionMode};
|
||||
use ty::adjustment;
|
||||
use ty::{TyVid, IntVid, FloatVid};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::error::{ExpectedFound, TypeError, UnconstrainedNumeric};
|
||||
use ty::fold::{TypeFolder, TypeFoldable};
|
||||
use ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use rustc_data_structures::unify::{self, UnificationTable};
|
||||
use std::cell::{RefCell, Ref};
|
||||
use std::fmt;
|
||||
@ -622,8 +622,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
}
|
||||
|
||||
pub fn type_is_unconstrained_numeric(&'a self, ty: Ty) -> UnconstrainedNumeric {
|
||||
use middle::ty::error::UnconstrainedNumeric::Neither;
|
||||
use middle::ty::error::UnconstrainedNumeric::{UnconstrainedInt, UnconstrainedFloat};
|
||||
use ty::error::UnconstrainedNumeric::Neither;
|
||||
use ty::error::UnconstrainedNumeric::{UnconstrainedInt, UnconstrainedFloat};
|
||||
match ty.sty {
|
||||
ty::TyInfer(ty::IntVar(vid)) => {
|
||||
if self.int_unification_table.borrow_mut().has_value(vid) {
|
@ -18,11 +18,11 @@
|
||||
/// For clarity, rename the graphviz crate locally to dot.
|
||||
use graphviz as dot;
|
||||
|
||||
use middle::ty::{self, TyCtxt};
|
||||
use ty::{self, TyCtxt};
|
||||
use middle::region::CodeExtent;
|
||||
use super::Constraint;
|
||||
use middle::infer::SubregionOrigin;
|
||||
use middle::infer::region_inference::RegionVarBindings;
|
||||
use infer::SubregionOrigin;
|
||||
use infer::region_inference::RegionVarBindings;
|
||||
use util::nodemap::{FnvHashMap, FnvHashSet};
|
||||
|
||||
use std::borrow::Cow;
|
@ -23,10 +23,10 @@ use super::unify_key;
|
||||
use rustc_data_structures::graph::{self, Direction, NodeIndex};
|
||||
use rustc_data_structures::unify::{self, UnificationTable};
|
||||
use middle::free_region::FreeRegionMap;
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::{BoundRegion, Region, RegionVid};
|
||||
use middle::ty::{ReEmpty, ReStatic, ReFree, ReEarlyBound};
|
||||
use middle::ty::{ReLateBound, ReScope, ReVar, ReSkolemized, BrFresh};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::{BoundRegion, Region, RegionVid};
|
||||
use ty::{ReEmpty, ReStatic, ReFree, ReEarlyBound};
|
||||
use ty::{ReLateBound, ReScope, ReVar, ReSkolemized, BrFresh};
|
||||
use util::common::indenter;
|
||||
use util::nodemap::{FnvHashMap, FnvHashSet};
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use super::{InferCtxt, FixupError, FixupResult};
|
||||
use middle::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// OPPORTUNISTIC TYPE RESOLVER
|
@ -13,9 +13,9 @@ use super::higher_ranked::HigherRankedRelations;
|
||||
use super::SubregionOrigin;
|
||||
use super::type_variable::{SubtypeOf, SupertypeOf};
|
||||
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::TyVar;
|
||||
use middle::ty::relate::{Cause, Relate, RelateResult, TypeRelation};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::TyVar;
|
||||
use ty::relate::{Cause, Relate, RelateResult, TypeRelation};
|
||||
use std::mem;
|
||||
|
||||
/// Ensures `a` is made a subtype of `b`. Returns `a` on success.
|
@ -12,7 +12,7 @@ pub use self::RelationDir::*;
|
||||
use self::TypeVariableValue::*;
|
||||
use self::UndoEntry::*;
|
||||
use middle::def_id::{DefId};
|
||||
use middle::ty::{self, Ty};
|
||||
use ty::{self, Ty};
|
||||
use syntax::codemap::Span;
|
||||
|
||||
use std::cmp::min;
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use syntax::ast;
|
||||
use middle::ty::{self, IntVarValue, Ty, TyCtxt};
|
||||
use ty::{self, IntVarValue, Ty, TyCtxt};
|
||||
use rustc_data_structures::unify::{Combine, UnifyKey};
|
||||
|
||||
pub trait ToType<'tcx> {
|
@ -78,6 +78,7 @@ pub mod back {
|
||||
pub use rustc_back::svh;
|
||||
}
|
||||
|
||||
pub mod cfg;
|
||||
pub mod dep_graph;
|
||||
|
||||
pub mod front {
|
||||
@ -85,10 +86,12 @@ pub mod front {
|
||||
pub mod map;
|
||||
}
|
||||
|
||||
pub mod infer;
|
||||
pub mod lint;
|
||||
|
||||
pub mod middle {
|
||||
pub mod astconv_util;
|
||||
pub mod expr_use_visitor; // STAGE0: increase glitch immunity
|
||||
pub mod cfg;
|
||||
pub mod check_match;
|
||||
pub mod const_eval;
|
||||
pub mod const_qualif;
|
||||
@ -102,7 +105,6 @@ pub mod middle {
|
||||
pub mod entry;
|
||||
pub mod free_region;
|
||||
pub mod intrinsicck;
|
||||
pub mod infer;
|
||||
pub mod lang_items;
|
||||
pub mod liveness;
|
||||
pub mod mem_categorization;
|
||||
@ -113,9 +115,6 @@ pub mod middle {
|
||||
pub mod recursion_limit;
|
||||
pub mod resolve_lifetime;
|
||||
pub mod stability;
|
||||
pub mod subst;
|
||||
pub mod traits;
|
||||
pub mod ty;
|
||||
pub mod weak_lang_items;
|
||||
}
|
||||
|
||||
@ -128,8 +127,8 @@ pub mod mir {
|
||||
}
|
||||
|
||||
pub mod session;
|
||||
|
||||
pub mod lint;
|
||||
pub mod traits;
|
||||
pub mod ty;
|
||||
|
||||
pub mod util {
|
||||
pub use rustc_back::sha2;
|
||||
|
@ -27,7 +27,7 @@ use self::TargetLint::*;
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use middle::privacy::AccessLevels;
|
||||
use middle::ty::TyCtxt;
|
||||
use ty::TyCtxt;
|
||||
use session::{config, early_error, Session};
|
||||
use lint::{Level, LevelSource, Lint, LintId, LintArray, LintPass};
|
||||
use lint::{EarlyLintPass, EarlyLintPassObject, LateLintPass, LateLintPassObject};
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
use middle::def::Def;
|
||||
use middle::ty::{Ty, TyCtxt};
|
||||
use ty::{Ty, TyCtxt};
|
||||
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::hir as ast;
|
||||
|
@ -22,12 +22,12 @@ use middle::def_id::{DefId};
|
||||
use middle::expr_use_visitor::{ConsumeMode, Delegate, ExprUseVisitor};
|
||||
use middle::expr_use_visitor::{LoanCause, MutateMode};
|
||||
use middle::expr_use_visitor as euv;
|
||||
use middle::infer;
|
||||
use infer;
|
||||
use middle::mem_categorization::{cmt};
|
||||
use middle::pat_util::*;
|
||||
use middle::traits::ProjectionMode;
|
||||
use middle::ty::*;
|
||||
use middle::ty;
|
||||
use traits::ProjectionMode;
|
||||
use ty::*;
|
||||
use ty;
|
||||
use std::cmp::Ordering;
|
||||
use std::fmt;
|
||||
use std::iter::{FromIterator, IntoIterator, repeat};
|
||||
|
@ -18,13 +18,13 @@ use front::map as ast_map;
|
||||
use front::map::blocks::FnLikeNode;
|
||||
use lint;
|
||||
use middle::cstore::{self, CrateStore, InlinedItem};
|
||||
use middle::{infer, subst, traits};
|
||||
use {infer, traits};
|
||||
use middle::def::Def;
|
||||
use middle::def_id::DefId;
|
||||
use middle::pat_util::def_to_path;
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::util::IntTypeExt;
|
||||
use middle::traits::ProjectionMode;
|
||||
use ty::{self, subst, Ty, TyCtxt};
|
||||
use ty::util::IntTypeExt;
|
||||
use traits::ProjectionMode;
|
||||
use middle::astconv_util::ast_ty_to_prim_ty;
|
||||
use util::nodemap::NodeMap;
|
||||
|
||||
|
@ -26,7 +26,7 @@ use back::svh::Svh;
|
||||
use front::map as hir_map;
|
||||
use middle::def::{self, Def};
|
||||
use middle::lang_items;
|
||||
use middle::ty::{self, Ty, TyCtxt, VariantKind};
|
||||
use ty::{self, Ty, TyCtxt, VariantKind};
|
||||
use middle::def_id::{DefId, DefIndex};
|
||||
use mir::repr::Mir;
|
||||
use mir::mir_map::MirMap;
|
||||
@ -498,8 +498,8 @@ pub mod tls {
|
||||
use serialize;
|
||||
use std::cell::Cell;
|
||||
use std::mem;
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::subst::Substs;
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::subst::Substs;
|
||||
use middle::def_id::DefId;
|
||||
|
||||
pub trait EncodingContext<'tcx> {
|
||||
|
@ -14,9 +14,9 @@
|
||||
//! and thus uses bitvectors. Your job is simply to specify the so-called
|
||||
//! GEN and KILL bits for each expression.
|
||||
|
||||
use middle::cfg;
|
||||
use middle::cfg::CFGIndex;
|
||||
use middle::ty::TyCtxt;
|
||||
use cfg;
|
||||
use cfg::CFGIndex;
|
||||
use ty::TyCtxt;
|
||||
use std::io;
|
||||
use std::mem;
|
||||
use std::usize;
|
||||
|
@ -17,8 +17,8 @@ use front::map as ast_map;
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
use rustc_front::intravisit::{self, Visitor};
|
||||
|
||||
use middle::{pat_util, privacy, ty};
|
||||
use middle::ty::TyCtxt;
|
||||
use middle::{pat_util, privacy};
|
||||
use ty::{self, TyCtxt};
|
||||
use middle::def::Def;
|
||||
use middle::def_id::{DefId};
|
||||
use lint;
|
||||
@ -84,7 +84,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
|
||||
}
|
||||
|
||||
fn lookup_and_handle_definition(&mut self, id: &ast::NodeId) {
|
||||
use middle::ty::TypeVariants::{TyEnum, TyStruct};
|
||||
use ty::TypeVariants::{TyEnum, TyStruct};
|
||||
|
||||
// If `bar` is a trait item, make sure to mark Foo as alive in `Foo::bar`
|
||||
self.tcx.tables.borrow().item_substs.get(id)
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst::ParamSpace;
|
||||
use ty::subst::ParamSpace;
|
||||
use util::nodemap::NodeMap;
|
||||
use syntax::ast;
|
||||
use rustc_front::hir;
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use middle::cstore::LOCAL_CRATE;
|
||||
use middle::ty;
|
||||
use ty;
|
||||
use syntax::ast::CrateNum;
|
||||
use std::fmt;
|
||||
use std::u32;
|
||||
|
@ -14,8 +14,8 @@ use self::RootUnsafeContext::*;
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use middle::def::Def;
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::MethodCall;
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::MethodCall;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
|
@ -22,9 +22,9 @@ use self::OverloadedCallType::*;
|
||||
use middle::pat_util;
|
||||
use middle::def::Def;
|
||||
use middle::def_id::{DefId};
|
||||
use middle::infer;
|
||||
use infer;
|
||||
use middle::mem_categorization as mc;
|
||||
use middle::ty::{self, TyCtxt, adjustment};
|
||||
use ty::{self, TyCtxt, adjustment};
|
||||
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
//! `TransitiveRelation` type and use that to decide when one free
|
||||
//! region outlives another and so forth.
|
||||
|
||||
use middle::ty::{self, TyCtxt, FreeRegion, Region};
|
||||
use middle::ty::wf::ImpliedBound;
|
||||
use ty::{self, TyCtxt, FreeRegion, Region};
|
||||
use ty::wf::ImpliedBound;
|
||||
use rustc_data_structures::transitive_relation::TransitiveRelation;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
@ -11,9 +11,9 @@
|
||||
use dep_graph::DepNode;
|
||||
use middle::def::Def;
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst::{Subst, Substs, EnumeratedItems};
|
||||
use middle::ty::{TransmuteRestriction, TyCtxt};
|
||||
use middle::ty::{self, Ty, TypeFoldable};
|
||||
use ty::subst::{Subst, Substs, EnumeratedItems};
|
||||
use ty::{TransmuteRestriction, TyCtxt};
|
||||
use ty::{self, Ty, TypeFoldable};
|
||||
|
||||
use std::fmt;
|
||||
|
||||
|
@ -26,7 +26,7 @@ use front::map as hir_map;
|
||||
use session::Session;
|
||||
use middle::cstore::CrateStore;
|
||||
use middle::def_id::DefId;
|
||||
use middle::ty;
|
||||
use ty;
|
||||
use middle::weak_lang_items;
|
||||
use util::nodemap::FnvHashMap;
|
||||
|
||||
|
@ -112,10 +112,10 @@ use self::VarKind::*;
|
||||
use dep_graph::DepNode;
|
||||
use middle::def::*;
|
||||
use middle::pat_util;
|
||||
use middle::ty::{self, TyCtxt, ParameterEnvironment};
|
||||
use middle::traits::{self, ProjectionMode};
|
||||
use middle::infer;
|
||||
use middle::subst::Subst;
|
||||
use ty::{self, TyCtxt, ParameterEnvironment};
|
||||
use traits::{self, ProjectionMode};
|
||||
use infer;
|
||||
use ty::subst::Subst;
|
||||
use lint;
|
||||
use util::nodemap::NodeMap;
|
||||
|
||||
|
@ -73,11 +73,11 @@ use self::Aliasability::*;
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use front::map as ast_map;
|
||||
use middle::infer;
|
||||
use infer;
|
||||
use middle::const_qualif::ConstQualif;
|
||||
use middle::def::Def;
|
||||
use middle::ty::adjustment;
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use ty::adjustment;
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
|
||||
use rustc_front::hir::{MutImmutable, MutMutable, PatKind};
|
||||
use rustc_front::hir;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
use middle::def::*;
|
||||
use middle::def_id::DefId;
|
||||
use middle::ty::TyCtxt;
|
||||
use ty::TyCtxt;
|
||||
use util::nodemap::FnvHashMap;
|
||||
|
||||
use syntax::ast;
|
||||
|
@ -19,7 +19,7 @@ use dep_graph::DepNode;
|
||||
use front::map as ast_map;
|
||||
use middle::def::Def;
|
||||
use middle::def_id::DefId;
|
||||
use middle::ty::{self, TyCtxt};
|
||||
use ty::{self, TyCtxt};
|
||||
use middle::privacy;
|
||||
use session::config;
|
||||
use util::nodemap::NodeSet;
|
||||
|
@ -21,7 +21,7 @@ use front::map as ast_map;
|
||||
use session::Session;
|
||||
use util::nodemap::{FnvHashMap, NodeMap, NodeSet};
|
||||
use middle::cstore::InlinedItem;
|
||||
use middle::ty;
|
||||
use ty;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::collections::hash_map::Entry;
|
||||
@ -280,7 +280,7 @@ pub struct RegionMaps {
|
||||
/// hierarchy based on their lexical mapping. This is used to
|
||||
/// handle the relationships between regions in a fn and in a
|
||||
/// closure defined by that fn. See the "Modeling closures"
|
||||
/// section of the README in middle::infer::region_inference for
|
||||
/// section of the README in infer::region_inference for
|
||||
/// more details.
|
||||
fn_tree: RefCell<NodeMap<ast::NodeId>>,
|
||||
}
|
||||
@ -291,7 +291,7 @@ pub struct Context {
|
||||
/// of the innermost fn body. Each fn forms its own disjoint tree
|
||||
/// in the region hierarchy. These fn bodies are themselves
|
||||
/// arranged into a tree. See the "Modeling closures" section of
|
||||
/// the README in middle::infer::region_inference for more
|
||||
/// the README in infer::region_inference for more
|
||||
/// details.
|
||||
root_id: Option<ast::NodeId>,
|
||||
|
||||
@ -460,7 +460,7 @@ impl RegionMaps {
|
||||
self.scope_map.borrow()[id.0 as usize].into_option()
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // used in middle::cfg
|
||||
#[allow(dead_code)] // used in cfg
|
||||
pub fn encl_scope(&self, id: CodeExtent) -> CodeExtent {
|
||||
//! Returns the narrowest scope that encloses `id`, if any.
|
||||
self.opt_encl_scope(id).unwrap()
|
||||
@ -587,7 +587,7 @@ impl RegionMaps {
|
||||
// different functions. Compare those fn for lexical
|
||||
// nesting. The reasoning behind this is subtle. See the
|
||||
// "Modeling closures" section of the README in
|
||||
// middle::infer::region_inference for more details.
|
||||
// infer::region_inference for more details.
|
||||
let a_root_scope = self.code_extent_data(a_ancestors[a_index]);
|
||||
let b_root_scope = self.code_extent_data(a_ancestors[a_index]);
|
||||
return match (a_root_scope, b_root_scope) {
|
||||
|
@ -23,8 +23,8 @@ use front::map::Map;
|
||||
use session::Session;
|
||||
use middle::def::{Def, DefMap};
|
||||
use middle::region;
|
||||
use middle::subst;
|
||||
use middle::ty;
|
||||
use ty::subst;
|
||||
use ty;
|
||||
use std::fmt;
|
||||
use std::mem::replace;
|
||||
use syntax::ast;
|
||||
|
@ -20,7 +20,7 @@ use lint;
|
||||
use middle::cstore::{CrateStore, LOCAL_CRATE};
|
||||
use middle::def::Def;
|
||||
use middle::def_id::{CRATE_DEF_INDEX, DefId};
|
||||
use middle::ty::{self, TyCtxt};
|
||||
use ty::{self, TyCtxt};
|
||||
use middle::privacy::AccessLevels;
|
||||
use syntax::parse::token::InternedString;
|
||||
use syntax::codemap::{Span, DUMMY_SP};
|
||||
|
@ -12,8 +12,8 @@ use graphviz::IntoCow;
|
||||
use middle::const_eval::ConstVal;
|
||||
use rustc_const_eval::{ConstUsize, ConstInt};
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst::Substs;
|
||||
use middle::ty::{self, AdtDef, ClosureSubsts, FnOutput, Region, Ty};
|
||||
use ty::subst::Substs;
|
||||
use ty::{self, AdtDef, ClosureSubsts, FnOutput, Region, Ty};
|
||||
use util::ppaux;
|
||||
use rustc_back::slice;
|
||||
use rustc_front::hir::InlineAsm;
|
||||
|
@ -14,9 +14,9 @@
|
||||
*/
|
||||
|
||||
use mir::repr::*;
|
||||
use middle::subst::{Subst, Substs};
|
||||
use middle::ty::{self, AdtDef, Ty, TyCtxt};
|
||||
use middle::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
use ty::subst::{Subst, Substs};
|
||||
use ty::{self, AdtDef, Ty, TyCtxt};
|
||||
use ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
use rustc_front::hir;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
use mir::mir_map::MirMap;
|
||||
use mir::repr::Mir;
|
||||
use middle::ty::TyCtxt;
|
||||
use ty::TyCtxt;
|
||||
use syntax::ast::NodeId;
|
||||
|
||||
/// Various information about pass.
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
use middle::const_eval::ConstVal;
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst::Substs;
|
||||
use middle::ty::{ClosureSubsts, FnOutput, Region, Ty};
|
||||
use ty::subst::Substs;
|
||||
use ty::{ClosureSubsts, FnOutput, Region, Ty};
|
||||
use mir::repr::*;
|
||||
use rustc_const_eval::ConstUsize;
|
||||
use rustc_data_structures::tuple_slice::TupleSlice;
|
||||
|
@ -14,9 +14,9 @@ use super::{SelectionContext, Obligation, ObligationCause};
|
||||
|
||||
use middle::cstore::LOCAL_CRATE;
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst::TypeSpace;
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::infer::{self, InferCtxt, TypeOrigin};
|
||||
use ty::subst::TypeSpace;
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use infer::{self, InferCtxt, TypeOrigin};
|
||||
use syntax::codemap::DUMMY_SP;
|
||||
|
||||
#[derive(Copy, Clone)]
|
@ -25,9 +25,9 @@ use super::{
|
||||
|
||||
use fmt_macros::{Parser, Piece, Position};
|
||||
use middle::def_id::DefId;
|
||||
use middle::infer::InferCtxt;
|
||||
use middle::ty::{self, ToPredicate, ToPolyTraitRef, TraitRef, Ty, TyCtxt, TypeFoldable};
|
||||
use middle::ty::fast_reject;
|
||||
use infer::InferCtxt;
|
||||
use ty::{self, ToPredicate, ToPolyTraitRef, TraitRef, Ty, TyCtxt, TypeFoldable};
|
||||
use ty::fast_reject;
|
||||
use util::nodemap::{FnvHashMap, FnvHashSet};
|
||||
|
||||
use std::cmp;
|
@ -9,8 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
use dep_graph::DepGraph;
|
||||
use middle::infer::InferCtxt;
|
||||
use middle::ty::{self, Ty, TyCtxt, TypeFoldable, ToPolyTraitRef};
|
||||
use infer::InferCtxt;
|
||||
use ty::{self, Ty, TyCtxt, TypeFoldable, ToPolyTraitRef};
|
||||
use rustc_data_structures::obligation_forest::{Backtrace, ObligationForest, Error};
|
||||
use std::iter;
|
||||
use syntax::ast;
|
@ -17,9 +17,9 @@ pub use self::ObligationCauseCode::*;
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::free_region::FreeRegionMap;
|
||||
use middle::subst;
|
||||
use middle::ty::{self, Ty, TypeFoldable};
|
||||
use middle::infer::{self, fixup_err_to_string, InferCtxt};
|
||||
use ty::subst;
|
||||
use ty::{self, Ty, TypeFoldable};
|
||||
use infer::{self, fixup_err_to_string, InferCtxt};
|
||||
|
||||
use std::rc::Rc;
|
||||
use syntax::ast;
|
@ -21,9 +21,9 @@ use super::supertraits;
|
||||
use super::elaborate_predicates;
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst::{self, SelfSpace, TypeSpace};
|
||||
use middle::traits;
|
||||
use middle::ty::{self, ToPolyTraitRef, Ty, TyCtxt, TypeFoldable};
|
||||
use ty::subst::{self, SelfSpace, TypeSpace};
|
||||
use traits;
|
||||
use ty::{self, ToPolyTraitRef, Ty, TyCtxt, TypeFoldable};
|
||||
use std::rc::Rc;
|
||||
use syntax::ast;
|
||||
|
@ -24,10 +24,10 @@ use super::VtableImplData;
|
||||
use super::util;
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::infer::{self, TypeOrigin};
|
||||
use middle::subst::Subst;
|
||||
use middle::ty::{self, ToPredicate, ToPolyTraitRef, Ty, TyCtxt};
|
||||
use middle::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use infer::{self, TypeOrigin};
|
||||
use ty::subst::Subst;
|
||||
use ty::{self, ToPredicate, ToPolyTraitRef, Ty, TyCtxt};
|
||||
use ty::fold::{TypeFoldable, TypeFolder};
|
||||
use syntax::parse::token;
|
||||
use syntax::ast;
|
||||
use util::common::FN_OUTPUT_NAME;
|
@ -37,13 +37,13 @@ use super::object_safety;
|
||||
use super::util;
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::infer;
|
||||
use middle::infer::{InferCtxt, TypeFreshener, TypeOrigin};
|
||||
use middle::subst::{Subst, Substs, TypeSpace};
|
||||
use middle::ty::{self, ToPredicate, ToPolyTraitRef, Ty, TyCtxt, TypeFoldable};
|
||||
use middle::traits;
|
||||
use middle::ty::fast_reject;
|
||||
use middle::ty::relate::TypeRelation;
|
||||
use infer;
|
||||
use infer::{InferCtxt, TypeFreshener, TypeOrigin};
|
||||
use ty::subst::{Subst, Substs, TypeSpace};
|
||||
use ty::{self, ToPredicate, ToPolyTraitRef, Ty, TyCtxt, TypeFoldable};
|
||||
use traits;
|
||||
use ty::fast_reject;
|
||||
use ty::relate::TypeRelation;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::fmt;
|
@ -22,11 +22,11 @@ use super::util::{fresh_type_vars_for_impl, impl_trait_ref_and_oblig};
|
||||
|
||||
use middle::cstore::CrateStore;
|
||||
use middle::def_id::DefId;
|
||||
use middle::infer::{self, InferCtxt, TypeOrigin};
|
||||
use infer::{self, InferCtxt, TypeOrigin};
|
||||
use middle::region;
|
||||
use middle::subst::{Subst, Substs};
|
||||
use middle::traits::{self, ProjectionMode, ObligationCause, Normalized};
|
||||
use middle::ty::{self, TyCtxt};
|
||||
use ty::subst::{Subst, Substs};
|
||||
use traits::{self, ProjectionMode, ObligationCause, Normalized};
|
||||
use ty::{self, TyCtxt};
|
||||
use syntax::codemap::DUMMY_SP;
|
||||
|
||||
pub mod specialization_graph;
|
@ -15,9 +15,9 @@ use super::{Overlap, specializes};
|
||||
|
||||
use middle::cstore::CrateStore;
|
||||
use middle::def_id::DefId;
|
||||
use middle::infer;
|
||||
use middle::traits::{self, ProjectionMode};
|
||||
use middle::ty::{self, TyCtxt, ImplOrTraitItem, TraitDef, TypeFoldable};
|
||||
use infer;
|
||||
use traits::{self, ProjectionMode};
|
||||
use ty::{self, TyCtxt, ImplOrTraitItem, TraitDef, TypeFoldable};
|
||||
use syntax::ast::Name;
|
||||
use util::nodemap::DefIdMap;
|
||||
|
@ -8,13 +8,13 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use middle::traits;
|
||||
use middle::traits::project::Normalized;
|
||||
use middle::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
use traits;
|
||||
use traits::project::Normalized;
|
||||
use ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
|
||||
use std::fmt;
|
||||
|
||||
// structural impls for the structs in middle::traits
|
||||
// structural impls for the structs in traits
|
||||
|
||||
impl<'tcx, T: fmt::Debug> fmt::Debug for Normalized<'tcx, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
@ -9,9 +9,9 @@
|
||||
// except according to those terms.
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::infer::InferCtxt;
|
||||
use middle::subst::{Subst, Substs};
|
||||
use middle::ty::{self, Ty, TyCtxt, ToPredicate, ToPolyTraitRef};
|
||||
use infer::InferCtxt;
|
||||
use ty::subst::{Subst, Substs};
|
||||
use ty::{self, Ty, TyCtxt, ToPredicate, ToPolyTraitRef};
|
||||
use syntax::codemap::Span;
|
||||
use util::common::ErrorReported;
|
||||
use util::nodemap::FnvHashSet;
|
@ -8,9 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::error::TypeError;
|
||||
use middle::ty::relate::{self, Relate, TypeRelation, RelateResult};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::error::TypeError;
|
||||
use ty::relate::{self, Relate, TypeRelation, RelateResult};
|
||||
|
||||
/// A type "A" *matches* "B" if the fresh types in B could be
|
||||
/// substituted with values so as to make it equal to A. Matching is
|
@ -11,8 +11,8 @@
|
||||
pub use self::AutoAdjustment::*;
|
||||
pub use self::AutoRef::*;
|
||||
|
||||
use middle::ty::{self, Ty, TyCtxt, TypeAndMut, TypeFoldable};
|
||||
use middle::ty::LvaluePreference::{NoPreference};
|
||||
use ty::{self, Ty, TyCtxt, TypeAndMut, TypeFoldable};
|
||||
use ty::LvaluePreference::{NoPreference};
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
@ -11,7 +11,7 @@
|
||||
// Helpers for handling cast expressions, used in both
|
||||
// typeck and trans.
|
||||
|
||||
use middle::ty::{self, Ty};
|
||||
use ty::{self, Ty};
|
||||
|
||||
use syntax::ast;
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use middle::def_id::{DefId};
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use util::common::MemoizationMap;
|
||||
use util::nodemap::FnvHashMap;
|
||||
|
@ -22,16 +22,16 @@ use middle::free_region::FreeRegionMap;
|
||||
use middle::region::RegionMaps;
|
||||
use middle::resolve_lifetime;
|
||||
use middle::stability;
|
||||
use middle::subst::{self, Subst, Substs};
|
||||
use middle::traits;
|
||||
use middle::ty::{self, TraitRef, Ty, TypeAndMut};
|
||||
use middle::ty::{TyS, TypeVariants};
|
||||
use middle::ty::{AdtDef, ClosureSubsts, ExistentialBounds, Region};
|
||||
use middle::ty::{FreevarMap};
|
||||
use middle::ty::{BareFnTy, InferTy, ParamTy, ProjectionTy, TraitTy};
|
||||
use middle::ty::{TyVar, TyVid, IntVar, IntVid, FloatVar, FloatVid};
|
||||
use middle::ty::TypeVariants::*;
|
||||
use middle::ty::maps;
|
||||
use ty::subst::{self, Subst, Substs};
|
||||
use traits;
|
||||
use ty::{self, TraitRef, Ty, TypeAndMut};
|
||||
use ty::{TyS, TypeVariants};
|
||||
use ty::{AdtDef, ClosureSubsts, ExistentialBounds, Region};
|
||||
use ty::{FreevarMap};
|
||||
use ty::{BareFnTy, InferTy, ParamTy, ProjectionTy, TraitTy};
|
||||
use ty::{TyVar, TyVid, IntVar, IntVid, FloatVar, FloatVid};
|
||||
use ty::TypeVariants::*;
|
||||
use ty::maps;
|
||||
use util::common::MemoizationMap;
|
||||
use util::nodemap::{NodeMap, NodeSet, DefIdMap, DefIdSet};
|
||||
use util::nodemap::FnvHashMap;
|
||||
@ -639,7 +639,7 @@ impl<'a, 'tcx> Lift<'tcx> for &'a Substs<'a> {
|
||||
|
||||
|
||||
pub mod tls {
|
||||
use middle::ty::TyCtxt;
|
||||
use ty::TyCtxt;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::fmt;
|
||||
@ -699,7 +699,7 @@ macro_rules! sty_debug_print {
|
||||
// variable names.
|
||||
#[allow(non_snake_case)]
|
||||
mod inner {
|
||||
use middle::ty::{self, TyCtxt};
|
||||
use ty::{self, TyCtxt};
|
||||
#[derive(Copy, Clone)]
|
||||
struct DebugStat {
|
||||
total: usize,
|
@ -9,9 +9,9 @@
|
||||
// except according to those terms.
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst;
|
||||
use middle::infer::type_variable;
|
||||
use middle::ty::{self, BoundRegion, Region, Ty, TyCtxt};
|
||||
use ty::subst;
|
||||
use infer::type_variable;
|
||||
use ty::{self, BoundRegion, Region, Ty, TyCtxt};
|
||||
|
||||
use std::fmt;
|
||||
use syntax::abi;
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use syntax::ast;
|
||||
|
||||
use self::SimplifiedType::*;
|
@ -8,8 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use middle::subst;
|
||||
use middle::ty::{self, Ty, TypeFlags, TypeFoldable};
|
||||
use ty::subst;
|
||||
use ty::{self, Ty, TypeFlags, TypeFoldable};
|
||||
|
||||
pub struct FlagComputation {
|
||||
pub flags: TypeFlags,
|
@ -40,9 +40,9 @@
|
||||
//! and does not need to visit anything else.
|
||||
|
||||
use middle::region;
|
||||
use middle::subst;
|
||||
use middle::ty::adjustment;
|
||||
use middle::ty::{self, Binder, Ty, TyCtxt, TypeFlags};
|
||||
use ty::subst;
|
||||
use ty::adjustment;
|
||||
use ty::{self, Binder, Ty, TyCtxt, TypeFlags};
|
||||
|
||||
use std::fmt;
|
||||
use util::nodemap::{FnvHashMap, FnvHashSet};
|
@ -11,7 +11,7 @@
|
||||
use front::map::DefPathData;
|
||||
use middle::cstore::LOCAL_CRATE;
|
||||
use middle::def_id::DefId;
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use syntax::ast;
|
||||
|
||||
impl<'tcx> TyCtxt<'tcx> {
|
@ -9,8 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use middle::ty::{Ty, TyS};
|
||||
use middle::ty::tls;
|
||||
use ty::{Ty, TyS};
|
||||
use ty::tls;
|
||||
|
||||
use rustc_data_structures::ivar;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
use dep_graph::{DepNode, DepTrackingMapConfig};
|
||||
use middle::def_id::DefId;
|
||||
use middle::ty;
|
||||
use ty;
|
||||
use std::marker::PhantomData;
|
||||
use std::rc::Rc;
|
||||
use syntax::{attr, ast};
|
@ -27,11 +27,11 @@ use middle::def::{self, Def, ExportMap};
|
||||
use middle::def_id::DefId;
|
||||
use middle::lang_items::{FnTraitLangItem, FnMutTraitLangItem, FnOnceTraitLangItem};
|
||||
use middle::region::{CodeExtent};
|
||||
use middle::subst::{self, Subst, Substs, VecPerParamSpace};
|
||||
use middle::traits;
|
||||
use middle::ty;
|
||||
use middle::ty::fold::TypeFolder;
|
||||
use middle::ty::walk::TypeWalker;
|
||||
use traits;
|
||||
use ty;
|
||||
use ty::fold::TypeFolder;
|
||||
use ty::subst::{Subst, Substs, VecPerParamSpace};
|
||||
use ty::walk::TypeWalker;
|
||||
use util::common::MemoizationMap;
|
||||
use util::nodemap::{NodeMap, NodeSet};
|
||||
use util::nodemap::FnvHashMap;
|
||||
@ -91,6 +91,7 @@ pub mod _match;
|
||||
pub mod maps;
|
||||
pub mod outlives;
|
||||
pub mod relate;
|
||||
pub mod subst;
|
||||
pub mod trait_def;
|
||||
pub mod walk;
|
||||
pub mod wf;
|
@ -12,8 +12,8 @@
|
||||
// refers to rules defined in RFC 1214 (`OutlivesFooBar`), so see that
|
||||
// RFC for reference.
|
||||
|
||||
use middle::infer::InferCtxt;
|
||||
use middle::ty::{self, Ty, TypeFoldable};
|
||||
use infer::InferCtxt;
|
||||
use ty::{self, Ty, TypeFoldable};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Component<'tcx> {
|
@ -14,9 +14,9 @@
|
||||
//! type equality, etc.
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst::{ParamSpace, Substs};
|
||||
use middle::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use middle::ty::error::{ExpectedFound, TypeError};
|
||||
use ty::subst::{ParamSpace, Substs};
|
||||
use ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use ty::error::{ExpectedFound, TypeError};
|
||||
use std::rc::Rc;
|
||||
use syntax::abi;
|
||||
use rustc_front::hir as ast;
|
@ -8,10 +8,10 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use middle::subst::{self, VecPerParamSpace};
|
||||
use middle::traits;
|
||||
use middle::ty::{self, Lift, TraitRef, Ty, TyCtxt};
|
||||
use middle::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
use ty::subst::{self, VecPerParamSpace};
|
||||
use traits;
|
||||
use ty::{self, Lift, TraitRef, Ty, TyCtxt};
|
||||
use ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
|
||||
use std::rc::Rc;
|
||||
use syntax::abi;
|
@ -13,9 +13,9 @@
|
||||
use middle::cstore;
|
||||
use middle::def_id::DefId;
|
||||
use middle::region;
|
||||
use middle::subst::{self, Substs};
|
||||
use middle::traits;
|
||||
use middle::ty::{self, AdtDef, ToPredicate, TypeFlags, Ty, TyCtxt, TyS, TypeFoldable};
|
||||
use ty::subst::{self, Substs};
|
||||
use traits;
|
||||
use ty::{self, AdtDef, ToPredicate, TypeFlags, Ty, TyCtxt, TyS, TypeFoldable};
|
||||
use util::common::ErrorReported;
|
||||
|
||||
use collections::enum_set::{self, EnumSet, CLike};
|
||||
@ -732,7 +732,7 @@ pub enum InferTy {
|
||||
|
||||
/// A `FreshTy` is one that is generated as a replacement for an
|
||||
/// unbound type variable. This is convenient for caching etc. See
|
||||
/// `middle::infer::freshen` for more details.
|
||||
/// `infer::freshen` for more details.
|
||||
FreshTy(u32),
|
||||
FreshIntTy(u32),
|
||||
FreshFloatTy(u32)
|
@ -14,8 +14,8 @@ pub use self::ParamSpace::*;
|
||||
|
||||
use middle::cstore;
|
||||
use middle::def_id::DefId;
|
||||
use middle::ty::{self, Ty, TyCtxt};
|
||||
use middle::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
use ty::fold::{TypeFoldable, TypeFolder};
|
||||
|
||||
use serialize::{Encodable, Encoder, Decodable, Decoder};
|
||||
use std::fmt;
|
@ -10,10 +10,10 @@
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use middle::def_id::DefId;
|
||||
use middle::traits::{self, specialization_graph};
|
||||
use middle::ty;
|
||||
use middle::ty::fast_reject;
|
||||
use middle::ty::{Ty, TyCtxt, TraitRef};
|
||||
use traits::{self, specialization_graph};
|
||||
use ty;
|
||||
use ty::fast_reject;
|
||||
use ty::{Ty, TyCtxt, TraitRef};
|
||||
use std::borrow::{Borrow};
|
||||
use std::cell::{Cell, Ref, RefCell};
|
||||
use syntax::ast::Name;
|
@ -14,13 +14,13 @@ use back::svh::Svh;
|
||||
use middle::const_eval::{self, ConstVal, ErrKind};
|
||||
use middle::const_eval::EvalHint::UncheckedExprHint;
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst;
|
||||
use middle::infer;
|
||||
use ty::subst;
|
||||
use infer;
|
||||
use middle::pat_util;
|
||||
use middle::traits::{self, ProjectionMode};
|
||||
use middle::ty::{self, Ty, TyCtxt, TypeAndMut, TypeFlags, TypeFoldable};
|
||||
use middle::ty::{Disr, ParameterEnvironment};
|
||||
use middle::ty::TypeVariants::*;
|
||||
use traits::{self, ProjectionMode};
|
||||
use ty::{self, Ty, TyCtxt, TypeAndMut, TypeFlags, TypeFoldable};
|
||||
use ty::{Disr, ParameterEnvironment};
|
||||
use ty::TypeVariants::*;
|
||||
|
||||
use rustc_const_eval::{ConstInt, ConstIsize, ConstUsize};
|
||||
|
@ -11,7 +11,7 @@
|
||||
//! An iterator over the type substructure.
|
||||
//! WARNING: this does not keep track of the region depth.
|
||||
|
||||
use middle::ty::{self, Ty};
|
||||
use ty::{self, Ty};
|
||||
use std::iter::Iterator;
|
||||
use std::vec::IntoIter;
|
||||
|
@ -9,11 +9,11 @@
|
||||
// except according to those terms.
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::infer::InferCtxt;
|
||||
use middle::ty::outlives::{self, Component};
|
||||
use middle::subst::Substs;
|
||||
use middle::traits;
|
||||
use middle::ty::{self, ToPredicate, Ty, TyCtxt, TypeFoldable};
|
||||
use infer::InferCtxt;
|
||||
use ty::outlives::{self, Component};
|
||||
use ty::subst::Substs;
|
||||
use traits;
|
||||
use ty::{self, ToPredicate, Ty, TyCtxt, TypeFoldable};
|
||||
use std::iter::once;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
@ -10,14 +10,14 @@
|
||||
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use middle::subst::{self, Subst};
|
||||
use middle::ty::{BrAnon, BrEnv, BrFresh, BrNamed};
|
||||
use middle::ty::{TyBool, TyChar, TyStruct, TyEnum};
|
||||
use middle::ty::{TyError, TyStr, TyArray, TySlice, TyFloat, TyFnDef, TyFnPtr};
|
||||
use middle::ty::{TyParam, TyRawPtr, TyRef, TyTuple};
|
||||
use middle::ty::TyClosure;
|
||||
use middle::ty::{TyBox, TyTrait, TyInt, TyUint, TyInfer};
|
||||
use middle::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use ty::subst::{self, Subst};
|
||||
use ty::{BrAnon, BrEnv, BrFresh, BrNamed};
|
||||
use ty::{TyBool, TyChar, TyStruct, TyEnum};
|
||||
use ty::{TyError, TyStr, TyArray, TySlice, TyFloat, TyFnDef, TyFnPtr};
|
||||
use ty::{TyParam, TyRawPtr, TyRef, TyTuple};
|
||||
use ty::TyClosure;
|
||||
use ty::{TyBox, TyTrait, TyInt, TyUint, TyInfer};
|
||||
use ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
|
||||
use std::fmt;
|
||||
use syntax::abi::Abi;
|
||||
|
@ -22,12 +22,12 @@ use borrowck::*;
|
||||
use borrowck::InteriorKind::{InteriorElement, InteriorField};
|
||||
use rustc::middle::expr_use_visitor as euv;
|
||||
use rustc::middle::expr_use_visitor::MutateMode;
|
||||
use rustc::middle::infer;
|
||||
use rustc::infer;
|
||||
use rustc::middle::mem_categorization as mc;
|
||||
use rustc::middle::mem_categorization::Categorization;
|
||||
use rustc::middle::region;
|
||||
use rustc::middle::ty::{self, TyCtxt};
|
||||
use rustc::middle::traits::ProjectionMode;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
use rustc::traits::ProjectionMode;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::hir;
|
||||
|
@ -21,7 +21,7 @@ use borrowck::LoanPathElem::{LpDeref, LpInterior};
|
||||
use borrowck::move_data::InvalidMovePathIndex;
|
||||
use borrowck::move_data::{MoveData, MovePathIndex};
|
||||
use rustc::middle::def_id::{DefId};
|
||||
use rustc::middle::ty::{self, TyCtxt};
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
use rustc::middle::mem_categorization as mc;
|
||||
|
||||
use std::mem;
|
||||
|
@ -18,7 +18,7 @@ use rustc::middle::expr_use_visitor as euv;
|
||||
use rustc::middle::mem_categorization as mc;
|
||||
use rustc::middle::mem_categorization::Categorization;
|
||||
use rustc::middle::mem_categorization::InteriorOffsetKind as Kind;
|
||||
use rustc::middle::ty;
|
||||
use rustc::ty;
|
||||
|
||||
use std::rc::Rc;
|
||||
use syntax::ast;
|
||||
|
@ -16,7 +16,7 @@ use rustc::middle::expr_use_visitor as euv;
|
||||
use rustc::middle::mem_categorization as mc;
|
||||
use rustc::middle::mem_categorization::Categorization;
|
||||
use rustc::middle::region;
|
||||
use rustc::middle::ty;
|
||||
use rustc::ty;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
|
@ -19,12 +19,12 @@
|
||||
use borrowck::*;
|
||||
use borrowck::move_data::MoveData;
|
||||
use rustc::middle::expr_use_visitor as euv;
|
||||
use rustc::middle::infer;
|
||||
use rustc::infer;
|
||||
use rustc::middle::mem_categorization as mc;
|
||||
use rustc::middle::mem_categorization::Categorization;
|
||||
use rustc::middle::region;
|
||||
use rustc::middle::ty::{self, TyCtxt};
|
||||
use rustc::middle::traits::ProjectionMode;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
use rustc::traits::ProjectionMode;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
|
@ -12,7 +12,7 @@ use borrowck::BorrowckCtxt;
|
||||
use rustc::middle::mem_categorization as mc;
|
||||
use rustc::middle::mem_categorization::Categorization;
|
||||
use rustc::middle::mem_categorization::InteriorOffsetKind as Kind;
|
||||
use rustc::middle::ty;
|
||||
use rustc::ty;
|
||||
use syntax::ast;
|
||||
use syntax::codemap;
|
||||
use syntax::errors::DiagnosticBuilder;
|
||||
|
@ -14,7 +14,7 @@ use borrowck::*;
|
||||
use rustc::middle::expr_use_visitor as euv;
|
||||
use rustc::middle::mem_categorization as mc;
|
||||
use rustc::middle::mem_categorization::Categorization;
|
||||
use rustc::middle::ty;
|
||||
use rustc::ty;
|
||||
use syntax::codemap::Span;
|
||||
|
||||
use borrowck::ToInteriorKind;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
use syntax::attr::AttrMetaMethods;
|
||||
|
||||
use rustc::middle::ty;
|
||||
use rustc::ty::TyCtxt;
|
||||
use rustc::mir::repr::{self, Mir};
|
||||
|
||||
use std::io;
|
||||
@ -459,7 +459,7 @@ impl<D: BitDenotation> DataflowState<D> {
|
||||
|
||||
|
||||
impl<'tcx> DataflowState<MoveData<'tcx>> {
|
||||
pub fn new_move_analysis(mir: &Mir<'tcx>, tcx: &ty::TyCtxt<'tcx>) -> Self {
|
||||
pub fn new_move_analysis(mir: &Mir<'tcx>, tcx: &TyCtxt<'tcx>) -> Self {
|
||||
let move_data = MoveData::gather_moves(mir, tcx);
|
||||
DataflowState::new(mir, move_data)
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
|
||||
use rustc::middle::ty::TyCtxt;
|
||||
use rustc::ty::TyCtxt;
|
||||
use rustc::mir::repr::*;
|
||||
use rustc::util::nodemap::FnvHashMap;
|
||||
|
||||
|
@ -23,7 +23,7 @@ use self::InteriorKind::*;
|
||||
use rustc::dep_graph::DepNode;
|
||||
use rustc::front::map as hir_map;
|
||||
use rustc::front::map::blocks::FnParts;
|
||||
use rustc::middle::cfg;
|
||||
use rustc::cfg;
|
||||
use rustc::middle::dataflow::DataFlowContext;
|
||||
use rustc::middle::dataflow::BitwiseOperator;
|
||||
use rustc::middle::dataflow::DataFlowOperator;
|
||||
@ -34,7 +34,7 @@ use rustc::middle::free_region::FreeRegionMap;
|
||||
use rustc::middle::mem_categorization as mc;
|
||||
use rustc::middle::mem_categorization::Categorization;
|
||||
use rustc::middle::region;
|
||||
use rustc::middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
|
@ -14,14 +14,14 @@
|
||||
pub use self::MoveKind::*;
|
||||
|
||||
use borrowck::*;
|
||||
use rustc::middle::cfg;
|
||||
use rustc::cfg;
|
||||
use rustc::middle::dataflow::DataFlowContext;
|
||||
use rustc::middle::dataflow::BitwiseOperator;
|
||||
use rustc::middle::dataflow::DataFlowOperator;
|
||||
use rustc::middle::dataflow::KillFrom;
|
||||
use rustc::middle::expr_use_visitor as euv;
|
||||
use rustc::middle::expr_use_visitor::MutateMode;
|
||||
use rustc::middle::ty::TyCtxt;
|
||||
use rustc::ty::TyCtxt;
|
||||
use rustc::util::nodemap::{FnvHashMap, NodeSet};
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
@ -14,13 +14,13 @@
|
||||
|
||||
pub use self::Variant::*;
|
||||
|
||||
pub use rustc::middle::cfg::graphviz::{Node, Edge};
|
||||
use rustc::middle::cfg::graphviz as cfg_dot;
|
||||
pub use rustc::cfg::graphviz::{Node, Edge};
|
||||
use rustc::cfg::graphviz as cfg_dot;
|
||||
|
||||
use borrowck;
|
||||
use borrowck::{BorrowckCtxt, LoanPath};
|
||||
use dot;
|
||||
use rustc::middle::cfg::CFGIndex;
|
||||
use rustc::cfg::CFGIndex;
|
||||
use rustc::middle::dataflow::{DataFlowOperator, DataFlowContext, EntryOrExit};
|
||||
use std::rc::Rc;
|
||||
use dot::IntoCow;
|
||||
|
@ -25,6 +25,7 @@ rustc_plugin = { path = "../librustc_plugin" }
|
||||
rustc_passes = { path = "../librustc_passes" }
|
||||
rustc_privacy = { path = "../librustc_privacy" }
|
||||
rustc_resolve = { path = "../librustc_resolve" }
|
||||
rustc_save_analysis = { path = "../librustc_save_analysis" }
|
||||
rustc_trans = { path = "../librustc_trans" }
|
||||
rustc_typeck = { path = "../librustc_typeck" }
|
||||
rustc_metadata = { path = "../librustc_metadata" }
|
||||
|
@ -17,9 +17,9 @@ use rustc::session::{Session, CompileResult, compile_result_from_err_count};
|
||||
use rustc::session::config::{self, Input, OutputFilenames, OutputType};
|
||||
use rustc::session::search_paths::PathKind;
|
||||
use rustc::lint;
|
||||
use rustc::middle::{self, dependency_format, stability, ty, reachable};
|
||||
use rustc::middle::{self, dependency_format, stability, reachable};
|
||||
use rustc::middle::privacy::AccessLevels;
|
||||
use rustc::middle::ty::TyCtxt;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
use rustc::util::common::time;
|
||||
use rustc::util::nodemap::NodeSet;
|
||||
use rustc_back::sha2::{Sha256, Digest};
|
||||
@ -30,7 +30,7 @@ use rustc_metadata::creader::LocalCrateReader;
|
||||
use rustc_metadata::cstore::CStore;
|
||||
use rustc_trans::back::link;
|
||||
use rustc_trans::back::write;
|
||||
use rustc_trans::trans;
|
||||
use rustc_trans as trans;
|
||||
use rustc_typeck as typeck;
|
||||
use rustc_privacy;
|
||||
use rustc_plugin::registry::Registry;
|
||||
|
@ -48,6 +48,7 @@ extern crate rustc_privacy;
|
||||
extern crate rustc_metadata;
|
||||
extern crate rustc_mir;
|
||||
extern crate rustc_resolve;
|
||||
extern crate rustc_save_analysis;
|
||||
extern crate rustc_trans;
|
||||
extern crate rustc_typeck;
|
||||
extern crate serialize;
|
||||
@ -62,8 +63,8 @@ use driver::CompileController;
|
||||
use pretty::{PpMode, UserIdentifiedItem};
|
||||
|
||||
use rustc_resolve as resolve;
|
||||
use rustc_save_analysis as save;
|
||||
use rustc_trans::back::link;
|
||||
use rustc_trans::save;
|
||||
use rustc::session::{config, Session, build_session, CompileResult};
|
||||
use rustc::session::config::{Input, PrintRequest, OutputType, ErrorOutputType};
|
||||
use rustc::session::config::{get_unstable_features_setting, OptionStability};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user