rustc: move cfg, infer, traits and ty from middle to top-level.

This commit is contained in:
Eduard Burtescu 2016-03-22 17:30:57 +02:00
parent 5647586ed3
commit 5efdde0de1
217 changed files with 617 additions and 617 deletions

View File

@ -9,10 +9,10 @@
// except according to those terms. // except according to those terms.
use rustc_data_structures::graph; use rustc_data_structures::graph;
use middle::cfg::*; use cfg::*;
use middle::def::Def; use middle::def::Def;
use middle::pat_util; use middle::pat_util;
use middle::ty::{self, TyCtxt}; use ty::{self, TyCtxt};
use syntax::ast; use syntax::ast;
use syntax::ptr::P; use syntax::ptr::P;

View File

@ -18,7 +18,7 @@ use graphviz::IntoCow;
use syntax::ast; use syntax::ast;
use front::map as ast_map; use front::map as ast_map;
use middle::cfg; use cfg;
pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode); pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);
pub type Edge<'a> = &'a cfg::CFGEdge; pub type Edge<'a> = &'a cfg::CFGEdge;

View File

@ -12,7 +12,7 @@
//! Uses `Graph` as the underlying representation. //! Uses `Graph` as the underlying representation.
use rustc_data_structures::graph; use rustc_data_structures::graph;
use middle::ty::TyCtxt; use ty::TyCtxt;
use syntax::ast; use syntax::ast;
use rustc_front::hir; use rustc_front::hir;

View File

@ -11,7 +11,7 @@
use self::thread::{DepGraphThreadData, DepMessage}; use self::thread::{DepGraphThreadData, DepMessage};
use middle::def_id::DefId; use middle::def_id::DefId;
use syntax::ast::NodeId; use syntax::ast::NodeId;
use middle::ty::TyCtxt; use ty::TyCtxt;
use rustc_front::hir; use rustc_front::hir;
use rustc_front::intravisit::Visitor; use rustc_front::intravisit::Visitor;
use std::rc::Rc; use std::rc::Rc;

View File

@ -28,9 +28,9 @@
use super::combine::{self, CombineFields}; use super::combine::{self, CombineFields};
use super::type_variable::{BiTo}; use super::type_variable::{BiTo};
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::TyVar; use ty::TyVar;
use middle::ty::relate::{Relate, RelateResult, TypeRelation}; use ty::relate::{Relate, RelateResult, TypeRelation};
pub struct Bivariate<'a, 'tcx: 'a> { pub struct Bivariate<'a, 'tcx: 'a> {
fields: CombineFields<'a, 'tcx> fields: CombineFields<'a, 'tcx>

View File

@ -41,11 +41,11 @@ use super::{InferCtxt};
use super::{MiscVariable, TypeTrace}; use super::{MiscVariable, TypeTrace};
use super::type_variable::{RelationDir, BiTo, EqTo, SubtypeOf, SupertypeOf}; use super::type_variable::{RelationDir, BiTo, EqTo, SubtypeOf, SupertypeOf};
use middle::ty::{IntType, UintType}; use ty::{IntType, UintType};
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::error::TypeError; use ty::error::TypeError;
use middle::ty::fold::{TypeFolder, TypeFoldable}; use ty::fold::{TypeFolder, TypeFoldable};
use middle::ty::relate::{Relate, RelateResult, TypeRelation}; use ty::relate::{Relate, RelateResult, TypeRelation};
use syntax::ast; use syntax::ast;
use syntax::codemap::Span; use syntax::codemap::Span;

View File

@ -13,9 +13,9 @@ use super::higher_ranked::HigherRankedRelations;
use super::{Subtype}; use super::{Subtype};
use super::type_variable::{EqTo}; use super::type_variable::{EqTo};
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::TyVar; use ty::TyVar;
use middle::ty::relate::{Relate, RelateResult, TypeRelation}; use ty::relate::{Relate, RelateResult, TypeRelation};
/// Ensures `a` is made equal to `b`. Returns `a` on success. /// Ensures `a` is made equal to `b`. Returns `a` on success.
pub struct Equate<'a, 'tcx: 'a> { pub struct Equate<'a, 'tcx: 'a> {

View File

@ -80,12 +80,12 @@ use rustc_front::print::pprust;
use middle::cstore::CrateStore; use middle::cstore::CrateStore;
use middle::def::Def; use middle::def::Def;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::infer::{self, TypeOrigin}; use infer::{self, TypeOrigin};
use middle::region; use middle::region;
use middle::ty::subst; use ty::subst;
use middle::ty::{self, Ty, TyCtxt, TypeFoldable}; use ty::{self, Ty, TyCtxt, TypeFoldable};
use middle::ty::{Region, ReFree}; use ty::{Region, ReFree};
use middle::ty::error::TypeError; use ty::error::TypeError;
use std::cell::{Cell, RefCell}; use std::cell::{Cell, RefCell};
use std::char::from_u32; use std::char::from_u32;

View File

@ -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 //! 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". //! inferencer knows "so far".
use middle::ty::{self, Ty, TyCtxt, TypeFoldable}; use ty::{self, Ty, TyCtxt, TypeFoldable};
use middle::ty::fold::TypeFolder; use ty::fold::TypeFolder;
use std::collections::hash_map::{self, Entry}; use std::collections::hash_map::{self, Entry};
use super::InferCtxt; use super::InferCtxt;

View File

@ -14,8 +14,8 @@ use super::InferCtxt;
use super::lattice::{self, LatticeDir}; use super::lattice::{self, LatticeDir};
use super::Subtype; use super::Subtype;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::relate::{Relate, RelateResult, TypeRelation}; use ty::relate::{Relate, RelateResult, TypeRelation};
/// "Greatest lower bound" (common subtype) /// "Greatest lower bound" (common subtype)
pub struct Glb<'a, 'tcx: 'a> { pub struct Glb<'a, 'tcx: 'a> {

View File

@ -14,9 +14,9 @@
use super::{CombinedSnapshot, InferCtxt, HigherRankedType, SkolemizationMap}; use super::{CombinedSnapshot, InferCtxt, HigherRankedType, SkolemizationMap};
use super::combine::CombineFields; use super::combine::CombineFields;
use middle::ty::{self, TyCtxt, Binder, TypeFoldable}; use ty::{self, TyCtxt, Binder, TypeFoldable};
use middle::ty::error::TypeError; use ty::error::TypeError;
use middle::ty::relate::{Relate, RelateResult, TypeRelation}; use ty::relate::{Relate, RelateResult, TypeRelation};
use syntax::codemap::Span; use syntax::codemap::Span;
use util::nodemap::{FnvHashMap, FnvHashSet}; use util::nodemap::{FnvHashMap, FnvHashSet};

View File

@ -32,9 +32,9 @@
use super::combine; use super::combine;
use super::InferCtxt; use super::InferCtxt;
use middle::ty::TyVar; use ty::TyVar;
use middle::ty::{self, Ty}; use ty::{self, Ty};
use middle::ty::relate::{RelateResult, TypeRelation}; use ty::relate::{RelateResult, TypeRelation};
pub trait LatticeDir<'f,'tcx> : TypeRelation<'f,'tcx> { pub trait LatticeDir<'f,'tcx> : TypeRelation<'f,'tcx> {
fn infcx(&self) -> &'f InferCtxt<'f, 'tcx>; fn infcx(&self) -> &'f InferCtxt<'f, 'tcx>;

View File

@ -14,8 +14,8 @@ use super::InferCtxt;
use super::lattice::{self, LatticeDir}; use super::lattice::{self, LatticeDir};
use super::Subtype; use super::Subtype;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::relate::{Relate, RelateResult, TypeRelation}; use ty::relate::{Relate, RelateResult, TypeRelation};
/// "Least upper bound" (common supertype) /// "Least upper bound" (common supertype)
pub struct Lub<'a, 'tcx: 'a> { pub struct Lub<'a, 'tcx: 'a> {

View File

@ -14,7 +14,7 @@ pub use self::LateBoundRegionConversionTime::*;
pub use self::RegionVariableOrigin::*; pub use self::RegionVariableOrigin::*;
pub use self::SubregionOrigin::*; pub use self::SubregionOrigin::*;
pub use self::ValuePairs::*; pub use self::ValuePairs::*;
pub use middle::ty::IntVarValue; pub use ty::IntVarValue;
pub use self::freshen::TypeFreshener; pub use self::freshen::TypeFreshener;
pub use self::region_inference::{GenericKind, VerifyBound}; 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 as mc;
use middle::mem_categorization::McResult; use middle::mem_categorization::McResult;
use middle::region::CodeExtent; use middle::region::CodeExtent;
use middle::ty::subst; use ty::subst;
use middle::ty::subst::Substs; use ty::subst::Substs;
use middle::ty::subst::Subst; use ty::subst::Subst;
use middle::traits::{self, ProjectionMode}; use traits::{self, ProjectionMode};
use middle::ty::adjustment; use ty::adjustment;
use middle::ty::{TyVid, IntVid, FloatVid}; use ty::{TyVid, IntVid, FloatVid};
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::error::{ExpectedFound, TypeError, UnconstrainedNumeric}; use ty::error::{ExpectedFound, TypeError, UnconstrainedNumeric};
use middle::ty::fold::{TypeFolder, TypeFoldable}; use ty::fold::{TypeFolder, TypeFoldable};
use middle::ty::relate::{Relate, RelateResult, TypeRelation}; use ty::relate::{Relate, RelateResult, TypeRelation};
use rustc_data_structures::unify::{self, UnificationTable}; use rustc_data_structures::unify::{self, UnificationTable};
use std::cell::{RefCell, Ref}; use std::cell::{RefCell, Ref};
use std::fmt; use std::fmt;
@ -622,8 +622,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
} }
pub fn type_is_unconstrained_numeric(&'a self, ty: Ty) -> UnconstrainedNumeric { pub fn type_is_unconstrained_numeric(&'a self, ty: Ty) -> UnconstrainedNumeric {
use middle::ty::error::UnconstrainedNumeric::Neither; use ty::error::UnconstrainedNumeric::Neither;
use middle::ty::error::UnconstrainedNumeric::{UnconstrainedInt, UnconstrainedFloat}; use ty::error::UnconstrainedNumeric::{UnconstrainedInt, UnconstrainedFloat};
match ty.sty { match ty.sty {
ty::TyInfer(ty::IntVar(vid)) => { ty::TyInfer(ty::IntVar(vid)) => {
if self.int_unification_table.borrow_mut().has_value(vid) { if self.int_unification_table.borrow_mut().has_value(vid) {

View File

@ -18,11 +18,11 @@
/// For clarity, rename the graphviz crate locally to dot. /// For clarity, rename the graphviz crate locally to dot.
use graphviz as dot; use graphviz as dot;
use middle::ty::{self, TyCtxt}; use ty::{self, TyCtxt};
use middle::region::CodeExtent; use middle::region::CodeExtent;
use super::Constraint; use super::Constraint;
use middle::infer::SubregionOrigin; use infer::SubregionOrigin;
use middle::infer::region_inference::RegionVarBindings; use infer::region_inference::RegionVarBindings;
use util::nodemap::{FnvHashMap, FnvHashSet}; use util::nodemap::{FnvHashMap, FnvHashSet};
use std::borrow::Cow; use std::borrow::Cow;

View File

@ -23,10 +23,10 @@ use super::unify_key;
use rustc_data_structures::graph::{self, Direction, NodeIndex}; use rustc_data_structures::graph::{self, Direction, NodeIndex};
use rustc_data_structures::unify::{self, UnificationTable}; use rustc_data_structures::unify::{self, UnificationTable};
use middle::free_region::FreeRegionMap; use middle::free_region::FreeRegionMap;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::{BoundRegion, Region, RegionVid}; use ty::{BoundRegion, Region, RegionVid};
use middle::ty::{ReEmpty, ReStatic, ReFree, ReEarlyBound}; use ty::{ReEmpty, ReStatic, ReFree, ReEarlyBound};
use middle::ty::{ReLateBound, ReScope, ReVar, ReSkolemized, BrFresh}; use ty::{ReLateBound, ReScope, ReVar, ReSkolemized, BrFresh};
use util::common::indenter; use util::common::indenter;
use util::nodemap::{FnvHashMap, FnvHashSet}; use util::nodemap::{FnvHashMap, FnvHashSet};

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use super::{InferCtxt, FixupError, FixupResult}; use super::{InferCtxt, FixupError, FixupResult};
use middle::ty::{self, Ty, TyCtxt, TypeFoldable}; use ty::{self, Ty, TyCtxt, TypeFoldable};
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// OPPORTUNISTIC TYPE RESOLVER // OPPORTUNISTIC TYPE RESOLVER

View File

@ -13,9 +13,9 @@ use super::higher_ranked::HigherRankedRelations;
use super::SubregionOrigin; use super::SubregionOrigin;
use super::type_variable::{SubtypeOf, SupertypeOf}; use super::type_variable::{SubtypeOf, SupertypeOf};
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::TyVar; use ty::TyVar;
use middle::ty::relate::{Cause, Relate, RelateResult, TypeRelation}; use ty::relate::{Cause, Relate, RelateResult, TypeRelation};
use std::mem; use std::mem;
/// Ensures `a` is made a subtype of `b`. Returns `a` on success. /// Ensures `a` is made a subtype of `b`. Returns `a` on success.

View File

@ -12,7 +12,7 @@ pub use self::RelationDir::*;
use self::TypeVariableValue::*; use self::TypeVariableValue::*;
use self::UndoEntry::*; use self::UndoEntry::*;
use middle::def_id::{DefId}; use middle::def_id::{DefId};
use middle::ty::{self, Ty}; use ty::{self, Ty};
use syntax::codemap::Span; use syntax::codemap::Span;
use std::cmp::min; use std::cmp::min;

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use syntax::ast; use syntax::ast;
use middle::ty::{self, IntVarValue, Ty, TyCtxt}; use ty::{self, IntVarValue, Ty, TyCtxt};
use rustc_data_structures::unify::{Combine, UnifyKey}; use rustc_data_structures::unify::{Combine, UnifyKey};
pub trait ToType<'tcx> { pub trait ToType<'tcx> {

View File

@ -78,6 +78,7 @@ pub mod back {
pub use rustc_back::svh; pub use rustc_back::svh;
} }
pub mod cfg;
pub mod dep_graph; pub mod dep_graph;
pub mod front { pub mod front {
@ -85,10 +86,12 @@ pub mod front {
pub mod map; pub mod map;
} }
pub mod infer;
pub mod lint;
pub mod middle { pub mod middle {
pub mod astconv_util; pub mod astconv_util;
pub mod expr_use_visitor; // STAGE0: increase glitch immunity pub mod expr_use_visitor; // STAGE0: increase glitch immunity
pub mod cfg;
pub mod check_match; pub mod check_match;
pub mod const_eval; pub mod const_eval;
pub mod const_qualif; pub mod const_qualif;
@ -102,7 +105,6 @@ pub mod middle {
pub mod entry; pub mod entry;
pub mod free_region; pub mod free_region;
pub mod intrinsicck; pub mod intrinsicck;
pub mod infer;
pub mod lang_items; pub mod lang_items;
pub mod liveness; pub mod liveness;
pub mod mem_categorization; pub mod mem_categorization;
@ -113,8 +115,6 @@ pub mod middle {
pub mod recursion_limit; pub mod recursion_limit;
pub mod resolve_lifetime; pub mod resolve_lifetime;
pub mod stability; pub mod stability;
pub mod traits;
pub mod ty;
pub mod weak_lang_items; pub mod weak_lang_items;
} }
@ -127,8 +127,8 @@ pub mod mir {
} }
pub mod session; pub mod session;
pub mod traits;
pub mod lint; pub mod ty;
pub mod util { pub mod util {
pub use rustc_back::sha2; pub use rustc_back::sha2;

View File

@ -27,7 +27,7 @@ use self::TargetLint::*;
use dep_graph::DepNode; use dep_graph::DepNode;
use middle::privacy::AccessLevels; use middle::privacy::AccessLevels;
use middle::ty::TyCtxt; use ty::TyCtxt;
use session::{config, early_error, Session}; use session::{config, early_error, Session};
use lint::{Level, LevelSource, Lint, LintId, LintArray, LintPass}; use lint::{Level, LevelSource, Lint, LintId, LintArray, LintPass};
use lint::{EarlyLintPass, EarlyLintPassObject, LateLintPass, LateLintPassObject}; use lint::{EarlyLintPass, EarlyLintPassObject, LateLintPass, LateLintPassObject};

View File

@ -15,7 +15,7 @@
*/ */
use middle::def::Def; use middle::def::Def;
use middle::ty::{Ty, TyCtxt}; use ty::{Ty, TyCtxt};
use syntax::codemap::Span; use syntax::codemap::Span;
use rustc_front::hir as ast; use rustc_front::hir as ast;

View File

@ -22,12 +22,12 @@ use middle::def_id::{DefId};
use middle::expr_use_visitor::{ConsumeMode, Delegate, ExprUseVisitor}; use middle::expr_use_visitor::{ConsumeMode, Delegate, ExprUseVisitor};
use middle::expr_use_visitor::{LoanCause, MutateMode}; use middle::expr_use_visitor::{LoanCause, MutateMode};
use middle::expr_use_visitor as euv; use middle::expr_use_visitor as euv;
use middle::infer; use infer;
use middle::mem_categorization::{cmt}; use middle::mem_categorization::{cmt};
use middle::pat_util::*; use middle::pat_util::*;
use middle::traits::ProjectionMode; use traits::ProjectionMode;
use middle::ty::*; use ty::*;
use middle::ty; use ty;
use std::cmp::Ordering; use std::cmp::Ordering;
use std::fmt; use std::fmt;
use std::iter::{FromIterator, IntoIterator, repeat}; use std::iter::{FromIterator, IntoIterator, repeat};

View File

@ -18,13 +18,13 @@ use front::map as ast_map;
use front::map::blocks::FnLikeNode; use front::map::blocks::FnLikeNode;
use lint; use lint;
use middle::cstore::{self, CrateStore, InlinedItem}; use middle::cstore::{self, CrateStore, InlinedItem};
use middle::{infer, traits}; use {infer, traits};
use middle::def::Def; use middle::def::Def;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::pat_util::def_to_path; use middle::pat_util::def_to_path;
use middle::ty::{self, subst, Ty, TyCtxt}; use ty::{self, subst, Ty, TyCtxt};
use middle::ty::util::IntTypeExt; use ty::util::IntTypeExt;
use middle::traits::ProjectionMode; use traits::ProjectionMode;
use middle::astconv_util::ast_ty_to_prim_ty; use middle::astconv_util::ast_ty_to_prim_ty;
use util::nodemap::NodeMap; use util::nodemap::NodeMap;

View File

@ -26,7 +26,7 @@ use back::svh::Svh;
use front::map as hir_map; use front::map as hir_map;
use middle::def::{self, Def}; use middle::def::{self, Def};
use middle::lang_items; use middle::lang_items;
use middle::ty::{self, Ty, TyCtxt, VariantKind}; use ty::{self, Ty, TyCtxt, VariantKind};
use middle::def_id::{DefId, DefIndex}; use middle::def_id::{DefId, DefIndex};
use mir::repr::Mir; use mir::repr::Mir;
use mir::mir_map::MirMap; use mir::mir_map::MirMap;
@ -498,8 +498,8 @@ pub mod tls {
use serialize; use serialize;
use std::cell::Cell; use std::cell::Cell;
use std::mem; use std::mem;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::subst::Substs; use ty::subst::Substs;
use middle::def_id::DefId; use middle::def_id::DefId;
pub trait EncodingContext<'tcx> { pub trait EncodingContext<'tcx> {

View File

@ -14,9 +14,9 @@
//! and thus uses bitvectors. Your job is simply to specify the so-called //! and thus uses bitvectors. Your job is simply to specify the so-called
//! GEN and KILL bits for each expression. //! GEN and KILL bits for each expression.
use middle::cfg; use cfg;
use middle::cfg::CFGIndex; use cfg::CFGIndex;
use middle::ty::TyCtxt; use ty::TyCtxt;
use std::io; use std::io;
use std::mem; use std::mem;
use std::usize; use std::usize;

View File

@ -17,8 +17,8 @@ use front::map as ast_map;
use rustc_front::hir::{self, PatKind}; use rustc_front::hir::{self, PatKind};
use rustc_front::intravisit::{self, Visitor}; use rustc_front::intravisit::{self, Visitor};
use middle::{pat_util, privacy, ty}; use middle::{pat_util, privacy};
use middle::ty::TyCtxt; use ty::{self, TyCtxt};
use middle::def::Def; use middle::def::Def;
use middle::def_id::{DefId}; use middle::def_id::{DefId};
use lint; use lint;
@ -84,7 +84,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
} }
fn lookup_and_handle_definition(&mut self, id: &ast::NodeId) { 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` // If `bar` is a trait item, make sure to mark Foo as alive in `Foo::bar`
self.tcx.tables.borrow().item_substs.get(id) self.tcx.tables.borrow().item_substs.get(id)

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::subst::ParamSpace; use ty::subst::ParamSpace;
use util::nodemap::NodeMap; use util::nodemap::NodeMap;
use syntax::ast; use syntax::ast;
use rustc_front::hir; use rustc_front::hir;

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use middle::cstore::LOCAL_CRATE; use middle::cstore::LOCAL_CRATE;
use middle::ty; use ty;
use syntax::ast::CrateNum; use syntax::ast::CrateNum;
use std::fmt; use std::fmt;
use std::u32; use std::u32;

View File

@ -14,8 +14,8 @@ use self::RootUnsafeContext::*;
use dep_graph::DepNode; use dep_graph::DepNode;
use middle::def::Def; use middle::def::Def;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::MethodCall; use ty::MethodCall;
use syntax::ast; use syntax::ast;
use syntax::codemap::Span; use syntax::codemap::Span;

View File

@ -22,9 +22,9 @@ use self::OverloadedCallType::*;
use middle::pat_util; use middle::pat_util;
use middle::def::Def; use middle::def::Def;
use middle::def_id::{DefId}; use middle::def_id::{DefId};
use middle::infer; use infer;
use middle::mem_categorization as mc; use middle::mem_categorization as mc;
use middle::ty::{self, TyCtxt, adjustment}; use ty::{self, TyCtxt, adjustment};
use rustc_front::hir::{self, PatKind}; use rustc_front::hir::{self, PatKind};

View File

@ -15,8 +15,8 @@
//! `TransitiveRelation` type and use that to decide when one free //! `TransitiveRelation` type and use that to decide when one free
//! region outlives another and so forth. //! region outlives another and so forth.
use middle::ty::{self, TyCtxt, FreeRegion, Region}; use ty::{self, TyCtxt, FreeRegion, Region};
use middle::ty::wf::ImpliedBound; use ty::wf::ImpliedBound;
use rustc_data_structures::transitive_relation::TransitiveRelation; use rustc_data_structures::transitive_relation::TransitiveRelation;
#[derive(Clone)] #[derive(Clone)]

View File

@ -11,9 +11,9 @@
use dep_graph::DepNode; use dep_graph::DepNode;
use middle::def::Def; use middle::def::Def;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::subst::{Subst, Substs, EnumeratedItems}; use ty::subst::{Subst, Substs, EnumeratedItems};
use middle::ty::{TransmuteRestriction, TyCtxt}; use ty::{TransmuteRestriction, TyCtxt};
use middle::ty::{self, Ty, TypeFoldable}; use ty::{self, Ty, TypeFoldable};
use std::fmt; use std::fmt;

View File

@ -26,7 +26,7 @@ use front::map as hir_map;
use session::Session; use session::Session;
use middle::cstore::CrateStore; use middle::cstore::CrateStore;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty; use ty;
use middle::weak_lang_items; use middle::weak_lang_items;
use util::nodemap::FnvHashMap; use util::nodemap::FnvHashMap;

View File

@ -112,10 +112,10 @@ use self::VarKind::*;
use dep_graph::DepNode; use dep_graph::DepNode;
use middle::def::*; use middle::def::*;
use middle::pat_util; use middle::pat_util;
use middle::ty::{self, TyCtxt, ParameterEnvironment}; use ty::{self, TyCtxt, ParameterEnvironment};
use middle::traits::{self, ProjectionMode}; use traits::{self, ProjectionMode};
use middle::infer; use infer;
use middle::ty::subst::Subst; use ty::subst::Subst;
use lint; use lint;
use util::nodemap::NodeMap; use util::nodemap::NodeMap;

View File

@ -73,11 +73,11 @@ use self::Aliasability::*;
use middle::def_id::DefId; use middle::def_id::DefId;
use front::map as ast_map; use front::map as ast_map;
use middle::infer; use infer;
use middle::const_qualif::ConstQualif; use middle::const_qualif::ConstQualif;
use middle::def::Def; use middle::def::Def;
use middle::ty::adjustment; use ty::adjustment;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use rustc_front::hir::{MutImmutable, MutMutable, PatKind}; use rustc_front::hir::{MutImmutable, MutMutable, PatKind};
use rustc_front::hir; use rustc_front::hir;

View File

@ -10,7 +10,7 @@
use middle::def::*; use middle::def::*;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::TyCtxt; use ty::TyCtxt;
use util::nodemap::FnvHashMap; use util::nodemap::FnvHashMap;
use syntax::ast; use syntax::ast;

View File

@ -19,7 +19,7 @@ use dep_graph::DepNode;
use front::map as ast_map; use front::map as ast_map;
use middle::def::Def; use middle::def::Def;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::{self, TyCtxt}; use ty::{self, TyCtxt};
use middle::privacy; use middle::privacy;
use session::config; use session::config;
use util::nodemap::NodeSet; use util::nodemap::NodeSet;

View File

@ -21,7 +21,7 @@ use front::map as ast_map;
use session::Session; use session::Session;
use util::nodemap::{FnvHashMap, NodeMap, NodeSet}; use util::nodemap::{FnvHashMap, NodeMap, NodeSet};
use middle::cstore::InlinedItem; use middle::cstore::InlinedItem;
use middle::ty; use ty;
use std::cell::RefCell; use std::cell::RefCell;
use std::collections::hash_map::Entry; use std::collections::hash_map::Entry;
@ -280,7 +280,7 @@ pub struct RegionMaps {
/// hierarchy based on their lexical mapping. This is used to /// hierarchy based on their lexical mapping. This is used to
/// handle the relationships between regions in a fn and in a /// handle the relationships between regions in a fn and in a
/// closure defined by that fn. See the "Modeling closures" /// 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. /// more details.
fn_tree: RefCell<NodeMap<ast::NodeId>>, 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 /// of the innermost fn body. Each fn forms its own disjoint tree
/// in the region hierarchy. These fn bodies are themselves /// in the region hierarchy. These fn bodies are themselves
/// arranged into a tree. See the "Modeling closures" section of /// 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. /// details.
root_id: Option<ast::NodeId>, root_id: Option<ast::NodeId>,
@ -460,7 +460,7 @@ impl RegionMaps {
self.scope_map.borrow()[id.0 as usize].into_option() 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 { pub fn encl_scope(&self, id: CodeExtent) -> CodeExtent {
//! Returns the narrowest scope that encloses `id`, if any. //! Returns the narrowest scope that encloses `id`, if any.
self.opt_encl_scope(id).unwrap() self.opt_encl_scope(id).unwrap()
@ -587,7 +587,7 @@ impl RegionMaps {
// different functions. Compare those fn for lexical // different functions. Compare those fn for lexical
// nesting. The reasoning behind this is subtle. See the // nesting. The reasoning behind this is subtle. See the
// "Modeling closures" section of the README in // "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 a_root_scope = self.code_extent_data(a_ancestors[a_index]);
let b_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) { return match (a_root_scope, b_root_scope) {

View File

@ -23,8 +23,8 @@ use front::map::Map;
use session::Session; use session::Session;
use middle::def::{Def, DefMap}; use middle::def::{Def, DefMap};
use middle::region; use middle::region;
use middle::ty::subst; use ty::subst;
use middle::ty; use ty;
use std::fmt; use std::fmt;
use std::mem::replace; use std::mem::replace;
use syntax::ast; use syntax::ast;

View File

@ -20,7 +20,7 @@ use lint;
use middle::cstore::{CrateStore, LOCAL_CRATE}; use middle::cstore::{CrateStore, LOCAL_CRATE};
use middle::def::Def; use middle::def::Def;
use middle::def_id::{CRATE_DEF_INDEX, DefId}; use middle::def_id::{CRATE_DEF_INDEX, DefId};
use middle::ty::{self, TyCtxt}; use ty::{self, TyCtxt};
use middle::privacy::AccessLevels; use middle::privacy::AccessLevels;
use syntax::parse::token::InternedString; use syntax::parse::token::InternedString;
use syntax::codemap::{Span, DUMMY_SP}; use syntax::codemap::{Span, DUMMY_SP};

View File

@ -12,8 +12,8 @@ use graphviz::IntoCow;
use middle::const_eval::ConstVal; use middle::const_eval::ConstVal;
use rustc_const_eval::{ConstUsize, ConstInt}; use rustc_const_eval::{ConstUsize, ConstInt};
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::subst::Substs; use ty::subst::Substs;
use middle::ty::{self, AdtDef, ClosureSubsts, FnOutput, Region, Ty}; use ty::{self, AdtDef, ClosureSubsts, FnOutput, Region, Ty};
use util::ppaux; use util::ppaux;
use rustc_back::slice; use rustc_back::slice;
use rustc_front::hir::InlineAsm; use rustc_front::hir::InlineAsm;

View File

@ -14,9 +14,9 @@
*/ */
use mir::repr::*; use mir::repr::*;
use middle::ty::subst::{Subst, Substs}; use ty::subst::{Subst, Substs};
use middle::ty::{self, AdtDef, Ty, TyCtxt}; use ty::{self, AdtDef, Ty, TyCtxt};
use middle::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor}; use ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
use rustc_front::hir; use rustc_front::hir;
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]

View File

@ -10,7 +10,7 @@
use mir::mir_map::MirMap; use mir::mir_map::MirMap;
use mir::repr::Mir; use mir::repr::Mir;
use middle::ty::TyCtxt; use ty::TyCtxt;
use syntax::ast::NodeId; use syntax::ast::NodeId;
/// Various information about pass. /// Various information about pass.

View File

@ -10,8 +10,8 @@
use middle::const_eval::ConstVal; use middle::const_eval::ConstVal;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::subst::Substs; use ty::subst::Substs;
use middle::ty::{ClosureSubsts, FnOutput, Region, Ty}; use ty::{ClosureSubsts, FnOutput, Region, Ty};
use mir::repr::*; use mir::repr::*;
use rustc_const_eval::ConstUsize; use rustc_const_eval::ConstUsize;
use rustc_data_structures::tuple_slice::TupleSlice; use rustc_data_structures::tuple_slice::TupleSlice;

View File

@ -14,9 +14,9 @@ use super::{SelectionContext, Obligation, ObligationCause};
use middle::cstore::LOCAL_CRATE; use middle::cstore::LOCAL_CRATE;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::subst::TypeSpace; use ty::subst::TypeSpace;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::infer::{self, InferCtxt, TypeOrigin}; use infer::{self, InferCtxt, TypeOrigin};
use syntax::codemap::DUMMY_SP; use syntax::codemap::DUMMY_SP;
#[derive(Copy, Clone)] #[derive(Copy, Clone)]

View File

@ -25,9 +25,9 @@ use super::{
use fmt_macros::{Parser, Piece, Position}; use fmt_macros::{Parser, Piece, Position};
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::infer::InferCtxt; use infer::InferCtxt;
use middle::ty::{self, ToPredicate, ToPolyTraitRef, TraitRef, Ty, TyCtxt, TypeFoldable}; use ty::{self, ToPredicate, ToPolyTraitRef, TraitRef, Ty, TyCtxt, TypeFoldable};
use middle::ty::fast_reject; use ty::fast_reject;
use util::nodemap::{FnvHashMap, FnvHashSet}; use util::nodemap::{FnvHashMap, FnvHashSet};
use std::cmp; use std::cmp;

View File

@ -9,8 +9,8 @@
// except according to those terms. // except according to those terms.
use dep_graph::DepGraph; use dep_graph::DepGraph;
use middle::infer::InferCtxt; use infer::InferCtxt;
use middle::ty::{self, Ty, TyCtxt, TypeFoldable, ToPolyTraitRef}; use ty::{self, Ty, TyCtxt, TypeFoldable, ToPolyTraitRef};
use rustc_data_structures::obligation_forest::{Backtrace, ObligationForest, Error}; use rustc_data_structures::obligation_forest::{Backtrace, ObligationForest, Error};
use std::iter; use std::iter;
use syntax::ast; use syntax::ast;

View File

@ -17,9 +17,9 @@ pub use self::ObligationCauseCode::*;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::free_region::FreeRegionMap; use middle::free_region::FreeRegionMap;
use middle::ty::subst; use ty::subst;
use middle::ty::{self, Ty, TypeFoldable}; use ty::{self, Ty, TypeFoldable};
use middle::infer::{self, fixup_err_to_string, InferCtxt}; use infer::{self, fixup_err_to_string, InferCtxt};
use std::rc::Rc; use std::rc::Rc;
use syntax::ast; use syntax::ast;

View File

@ -21,9 +21,9 @@ use super::supertraits;
use super::elaborate_predicates; use super::elaborate_predicates;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::subst::{self, SelfSpace, TypeSpace}; use ty::subst::{self, SelfSpace, TypeSpace};
use middle::traits; use traits;
use middle::ty::{self, ToPolyTraitRef, Ty, TyCtxt, TypeFoldable}; use ty::{self, ToPolyTraitRef, Ty, TyCtxt, TypeFoldable};
use std::rc::Rc; use std::rc::Rc;
use syntax::ast; use syntax::ast;

View File

@ -24,10 +24,10 @@ use super::VtableImplData;
use super::util; use super::util;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::infer::{self, TypeOrigin}; use infer::{self, TypeOrigin};
use middle::ty::subst::Subst; use ty::subst::Subst;
use middle::ty::{self, ToPredicate, ToPolyTraitRef, Ty, TyCtxt}; use ty::{self, ToPredicate, ToPolyTraitRef, Ty, TyCtxt};
use middle::ty::fold::{TypeFoldable, TypeFolder}; use ty::fold::{TypeFoldable, TypeFolder};
use syntax::parse::token; use syntax::parse::token;
use syntax::ast; use syntax::ast;
use util::common::FN_OUTPUT_NAME; use util::common::FN_OUTPUT_NAME;

View File

@ -37,13 +37,13 @@ use super::object_safety;
use super::util; use super::util;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::infer; use infer;
use middle::infer::{InferCtxt, TypeFreshener, TypeOrigin}; use infer::{InferCtxt, TypeFreshener, TypeOrigin};
use middle::ty::subst::{Subst, Substs, TypeSpace}; use ty::subst::{Subst, Substs, TypeSpace};
use middle::ty::{self, ToPredicate, ToPolyTraitRef, Ty, TyCtxt, TypeFoldable}; use ty::{self, ToPredicate, ToPolyTraitRef, Ty, TyCtxt, TypeFoldable};
use middle::traits; use traits;
use middle::ty::fast_reject; use ty::fast_reject;
use middle::ty::relate::TypeRelation; use ty::relate::TypeRelation;
use std::cell::RefCell; use std::cell::RefCell;
use std::fmt; use std::fmt;

View File

@ -22,11 +22,11 @@ use super::util::{fresh_type_vars_for_impl, impl_trait_ref_and_oblig};
use middle::cstore::CrateStore; use middle::cstore::CrateStore;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::infer::{self, InferCtxt, TypeOrigin}; use infer::{self, InferCtxt, TypeOrigin};
use middle::region; use middle::region;
use middle::ty::subst::{Subst, Substs}; use ty::subst::{Subst, Substs};
use middle::traits::{self, ProjectionMode, ObligationCause, Normalized}; use traits::{self, ProjectionMode, ObligationCause, Normalized};
use middle::ty::{self, TyCtxt}; use ty::{self, TyCtxt};
use syntax::codemap::DUMMY_SP; use syntax::codemap::DUMMY_SP;
pub mod specialization_graph; pub mod specialization_graph;

View File

@ -15,9 +15,9 @@ use super::{Overlap, specializes};
use middle::cstore::CrateStore; use middle::cstore::CrateStore;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::infer; use infer;
use middle::traits::{self, ProjectionMode}; use traits::{self, ProjectionMode};
use middle::ty::{self, TyCtxt, ImplOrTraitItem, TraitDef, TypeFoldable}; use ty::{self, TyCtxt, ImplOrTraitItem, TraitDef, TypeFoldable};
use syntax::ast::Name; use syntax::ast::Name;
use util::nodemap::DefIdMap; use util::nodemap::DefIdMap;

View File

@ -8,13 +8,13 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use middle::traits; use traits;
use middle::traits::project::Normalized; use traits::project::Normalized;
use middle::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor}; use ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
use std::fmt; 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> { impl<'tcx, T: fmt::Debug> fmt::Debug for Normalized<'tcx, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

View File

@ -9,9 +9,9 @@
// except according to those terms. // except according to those terms.
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::infer::InferCtxt; use infer::InferCtxt;
use middle::ty::subst::{Subst, Substs}; use ty::subst::{Subst, Substs};
use middle::ty::{self, Ty, TyCtxt, ToPredicate, ToPolyTraitRef}; use ty::{self, Ty, TyCtxt, ToPredicate, ToPolyTraitRef};
use syntax::codemap::Span; use syntax::codemap::Span;
use util::common::ErrorReported; use util::common::ErrorReported;
use util::nodemap::FnvHashSet; use util::nodemap::FnvHashSet;

View File

@ -8,9 +8,9 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::error::TypeError; use ty::error::TypeError;
use middle::ty::relate::{self, Relate, TypeRelation, RelateResult}; use ty::relate::{self, Relate, TypeRelation, RelateResult};
/// A type "A" *matches* "B" if the fresh types in B could be /// 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 /// substituted with values so as to make it equal to A. Matching is

View File

@ -11,8 +11,8 @@
pub use self::AutoAdjustment::*; pub use self::AutoAdjustment::*;
pub use self::AutoRef::*; pub use self::AutoRef::*;
use middle::ty::{self, Ty, TyCtxt, TypeAndMut, TypeFoldable}; use ty::{self, Ty, TyCtxt, TypeAndMut, TypeFoldable};
use middle::ty::LvaluePreference::{NoPreference}; use ty::LvaluePreference::{NoPreference};
use syntax::ast; use syntax::ast;
use syntax::codemap::Span; use syntax::codemap::Span;

View File

@ -11,7 +11,7 @@
// Helpers for handling cast expressions, used in both // Helpers for handling cast expressions, used in both
// typeck and trans. // typeck and trans.
use middle::ty::{self, Ty}; use ty::{self, Ty};
use syntax::ast; use syntax::ast;

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use middle::def_id::{DefId}; use middle::def_id::{DefId};
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use util::common::MemoizationMap; use util::common::MemoizationMap;
use util::nodemap::FnvHashMap; use util::nodemap::FnvHashMap;

View File

@ -22,16 +22,16 @@ use middle::free_region::FreeRegionMap;
use middle::region::RegionMaps; use middle::region::RegionMaps;
use middle::resolve_lifetime; use middle::resolve_lifetime;
use middle::stability; use middle::stability;
use middle::ty::subst::{self, Subst, Substs}; use ty::subst::{self, Subst, Substs};
use middle::traits; use traits;
use middle::ty::{self, TraitRef, Ty, TypeAndMut}; use ty::{self, TraitRef, Ty, TypeAndMut};
use middle::ty::{TyS, TypeVariants}; use ty::{TyS, TypeVariants};
use middle::ty::{AdtDef, ClosureSubsts, ExistentialBounds, Region}; use ty::{AdtDef, ClosureSubsts, ExistentialBounds, Region};
use middle::ty::{FreevarMap}; use ty::{FreevarMap};
use middle::ty::{BareFnTy, InferTy, ParamTy, ProjectionTy, TraitTy}; use ty::{BareFnTy, InferTy, ParamTy, ProjectionTy, TraitTy};
use middle::ty::{TyVar, TyVid, IntVar, IntVid, FloatVar, FloatVid}; use ty::{TyVar, TyVid, IntVar, IntVid, FloatVar, FloatVid};
use middle::ty::TypeVariants::*; use ty::TypeVariants::*;
use middle::ty::maps; use ty::maps;
use util::common::MemoizationMap; use util::common::MemoizationMap;
use util::nodemap::{NodeMap, NodeSet, DefIdMap, DefIdSet}; use util::nodemap::{NodeMap, NodeSet, DefIdMap, DefIdSet};
use util::nodemap::FnvHashMap; use util::nodemap::FnvHashMap;
@ -639,7 +639,7 @@ impl<'a, 'tcx> Lift<'tcx> for &'a Substs<'a> {
pub mod tls { pub mod tls {
use middle::ty::TyCtxt; use ty::TyCtxt;
use std::cell::Cell; use std::cell::Cell;
use std::fmt; use std::fmt;
@ -699,7 +699,7 @@ macro_rules! sty_debug_print {
// variable names. // variable names.
#[allow(non_snake_case)] #[allow(non_snake_case)]
mod inner { mod inner {
use middle::ty::{self, TyCtxt}; use ty::{self, TyCtxt};
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
struct DebugStat { struct DebugStat {
total: usize, total: usize,

View File

@ -9,9 +9,9 @@
// except according to those terms. // except according to those terms.
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::subst; use ty::subst;
use middle::infer::type_variable; use infer::type_variable;
use middle::ty::{self, BoundRegion, Region, Ty, TyCtxt}; use ty::{self, BoundRegion, Region, Ty, TyCtxt};
use std::fmt; use std::fmt;
use syntax::abi; use syntax::abi;

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use syntax::ast; use syntax::ast;
use self::SimplifiedType::*; use self::SimplifiedType::*;

View File

@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use middle::ty::subst; use ty::subst;
use middle::ty::{self, Ty, TypeFlags, TypeFoldable}; use ty::{self, Ty, TypeFlags, TypeFoldable};
pub struct FlagComputation { pub struct FlagComputation {
pub flags: TypeFlags, pub flags: TypeFlags,

View File

@ -40,9 +40,9 @@
//! and does not need to visit anything else. //! and does not need to visit anything else.
use middle::region; use middle::region;
use middle::ty::subst; use ty::subst;
use middle::ty::adjustment; use ty::adjustment;
use middle::ty::{self, Binder, Ty, TyCtxt, TypeFlags}; use ty::{self, Binder, Ty, TyCtxt, TypeFlags};
use std::fmt; use std::fmt;
use util::nodemap::{FnvHashMap, FnvHashSet}; use util::nodemap::{FnvHashMap, FnvHashSet};

View File

@ -11,7 +11,7 @@
use front::map::DefPathData; use front::map::DefPathData;
use middle::cstore::LOCAL_CRATE; use middle::cstore::LOCAL_CRATE;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use syntax::ast; use syntax::ast;
impl<'tcx> TyCtxt<'tcx> { impl<'tcx> TyCtxt<'tcx> {

View File

@ -9,8 +9,8 @@
// except according to those terms. // except according to those terms.
use dep_graph::DepNode; use dep_graph::DepNode;
use middle::ty::{Ty, TyS}; use ty::{Ty, TyS};
use middle::ty::tls; use ty::tls;
use rustc_data_structures::ivar; use rustc_data_structures::ivar;

View File

@ -10,7 +10,7 @@
use dep_graph::{DepNode, DepTrackingMapConfig}; use dep_graph::{DepNode, DepTrackingMapConfig};
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty; use ty;
use std::marker::PhantomData; use std::marker::PhantomData;
use std::rc::Rc; use std::rc::Rc;
use syntax::{attr, ast}; use syntax::{attr, ast};

View File

@ -27,11 +27,11 @@ use middle::def::{self, Def, ExportMap};
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::lang_items::{FnTraitLangItem, FnMutTraitLangItem, FnOnceTraitLangItem}; use middle::lang_items::{FnTraitLangItem, FnMutTraitLangItem, FnOnceTraitLangItem};
use middle::region::{CodeExtent}; use middle::region::{CodeExtent};
use middle::traits; use traits;
use middle::ty; use ty;
use middle::ty::fold::TypeFolder; use ty::fold::TypeFolder;
use middle::ty::subst::{Subst, Substs, VecPerParamSpace}; use ty::subst::{Subst, Substs, VecPerParamSpace};
use middle::ty::walk::TypeWalker; use ty::walk::TypeWalker;
use util::common::MemoizationMap; use util::common::MemoizationMap;
use util::nodemap::{NodeMap, NodeSet}; use util::nodemap::{NodeMap, NodeSet};
use util::nodemap::FnvHashMap; use util::nodemap::FnvHashMap;

View File

@ -12,8 +12,8 @@
// refers to rules defined in RFC 1214 (`OutlivesFooBar`), so see that // refers to rules defined in RFC 1214 (`OutlivesFooBar`), so see that
// RFC for reference. // RFC for reference.
use middle::infer::InferCtxt; use infer::InferCtxt;
use middle::ty::{self, Ty, TypeFoldable}; use ty::{self, Ty, TypeFoldable};
#[derive(Debug)] #[derive(Debug)]
pub enum Component<'tcx> { pub enum Component<'tcx> {

View File

@ -14,9 +14,9 @@
//! type equality, etc. //! type equality, etc.
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::subst::{ParamSpace, Substs}; use ty::subst::{ParamSpace, Substs};
use middle::ty::{self, Ty, TyCtxt, TypeFoldable}; use ty::{self, Ty, TyCtxt, TypeFoldable};
use middle::ty::error::{ExpectedFound, TypeError}; use ty::error::{ExpectedFound, TypeError};
use std::rc::Rc; use std::rc::Rc;
use syntax::abi; use syntax::abi;
use rustc_front::hir as ast; use rustc_front::hir as ast;

View File

@ -8,10 +8,10 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use middle::ty::subst::{self, VecPerParamSpace}; use ty::subst::{self, VecPerParamSpace};
use middle::traits; use traits;
use middle::ty::{self, Lift, TraitRef, Ty, TyCtxt}; use ty::{self, Lift, TraitRef, Ty, TyCtxt};
use middle::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor}; use ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
use std::rc::Rc; use std::rc::Rc;
use syntax::abi; use syntax::abi;

View File

@ -13,9 +13,9 @@
use middle::cstore; use middle::cstore;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::region; use middle::region;
use middle::ty::subst::{self, Substs}; use ty::subst::{self, Substs};
use middle::traits; use traits;
use middle::ty::{self, AdtDef, ToPredicate, TypeFlags, Ty, TyCtxt, TyS, TypeFoldable}; use ty::{self, AdtDef, ToPredicate, TypeFlags, Ty, TyCtxt, TyS, TypeFoldable};
use util::common::ErrorReported; use util::common::ErrorReported;
use collections::enum_set::{self, EnumSet, CLike}; 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 /// A `FreshTy` is one that is generated as a replacement for an
/// unbound type variable. This is convenient for caching etc. See /// unbound type variable. This is convenient for caching etc. See
/// `middle::infer::freshen` for more details. /// `infer::freshen` for more details.
FreshTy(u32), FreshTy(u32),
FreshIntTy(u32), FreshIntTy(u32),
FreshFloatTy(u32) FreshFloatTy(u32)

View File

@ -14,8 +14,8 @@ pub use self::ParamSpace::*;
use middle::cstore; use middle::cstore;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::{self, Ty, TyCtxt}; use ty::{self, Ty, TyCtxt};
use middle::ty::fold::{TypeFoldable, TypeFolder}; use ty::fold::{TypeFoldable, TypeFolder};
use serialize::{Encodable, Encoder, Decodable, Decoder}; use serialize::{Encodable, Encoder, Decodable, Decoder};
use std::fmt; use std::fmt;

View File

@ -10,10 +10,10 @@
use dep_graph::DepNode; use dep_graph::DepNode;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::traits::{self, specialization_graph}; use traits::{self, specialization_graph};
use middle::ty; use ty;
use middle::ty::fast_reject; use ty::fast_reject;
use middle::ty::{Ty, TyCtxt, TraitRef}; use ty::{Ty, TyCtxt, TraitRef};
use std::borrow::{Borrow}; use std::borrow::{Borrow};
use std::cell::{Cell, Ref, RefCell}; use std::cell::{Cell, Ref, RefCell};
use syntax::ast::Name; use syntax::ast::Name;

View File

@ -14,13 +14,13 @@ use back::svh::Svh;
use middle::const_eval::{self, ConstVal, ErrKind}; use middle::const_eval::{self, ConstVal, ErrKind};
use middle::const_eval::EvalHint::UncheckedExprHint; use middle::const_eval::EvalHint::UncheckedExprHint;
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::subst; use ty::subst;
use middle::infer; use infer;
use middle::pat_util; use middle::pat_util;
use middle::traits::{self, ProjectionMode}; use traits::{self, ProjectionMode};
use middle::ty::{self, Ty, TyCtxt, TypeAndMut, TypeFlags, TypeFoldable}; use ty::{self, Ty, TyCtxt, TypeAndMut, TypeFlags, TypeFoldable};
use middle::ty::{Disr, ParameterEnvironment}; use ty::{Disr, ParameterEnvironment};
use middle::ty::TypeVariants::*; use ty::TypeVariants::*;
use rustc_const_eval::{ConstInt, ConstIsize, ConstUsize}; use rustc_const_eval::{ConstInt, ConstIsize, ConstUsize};

View File

@ -11,7 +11,7 @@
//! An iterator over the type substructure. //! An iterator over the type substructure.
//! WARNING: this does not keep track of the region depth. //! 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::iter::Iterator;
use std::vec::IntoIter; use std::vec::IntoIter;

View File

@ -9,11 +9,11 @@
// except according to those terms. // except according to those terms.
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::infer::InferCtxt; use infer::InferCtxt;
use middle::ty::outlives::{self, Component}; use ty::outlives::{self, Component};
use middle::ty::subst::Substs; use ty::subst::Substs;
use middle::traits; use traits;
use middle::ty::{self, ToPredicate, Ty, TyCtxt, TypeFoldable}; use ty::{self, ToPredicate, Ty, TyCtxt, TypeFoldable};
use std::iter::once; use std::iter::once;
use syntax::ast; use syntax::ast;
use syntax::codemap::Span; use syntax::codemap::Span;

View File

@ -10,14 +10,14 @@
use middle::def_id::DefId; use middle::def_id::DefId;
use middle::ty::subst::{self, Subst}; use ty::subst::{self, Subst};
use middle::ty::{BrAnon, BrEnv, BrFresh, BrNamed}; use ty::{BrAnon, BrEnv, BrFresh, BrNamed};
use middle::ty::{TyBool, TyChar, TyStruct, TyEnum}; use ty::{TyBool, TyChar, TyStruct, TyEnum};
use middle::ty::{TyError, TyStr, TyArray, TySlice, TyFloat, TyFnDef, TyFnPtr}; use ty::{TyError, TyStr, TyArray, TySlice, TyFloat, TyFnDef, TyFnPtr};
use middle::ty::{TyParam, TyRawPtr, TyRef, TyTuple}; use ty::{TyParam, TyRawPtr, TyRef, TyTuple};
use middle::ty::TyClosure; use ty::TyClosure;
use middle::ty::{TyBox, TyTrait, TyInt, TyUint, TyInfer}; use ty::{TyBox, TyTrait, TyInt, TyUint, TyInfer};
use middle::ty::{self, Ty, TyCtxt, TypeFoldable}; use ty::{self, Ty, TyCtxt, TypeFoldable};
use std::fmt; use std::fmt;
use syntax::abi::Abi; use syntax::abi::Abi;

View File

@ -22,12 +22,12 @@ use borrowck::*;
use borrowck::InteriorKind::{InteriorElement, InteriorField}; use borrowck::InteriorKind::{InteriorElement, InteriorField};
use rustc::middle::expr_use_visitor as euv; use rustc::middle::expr_use_visitor as euv;
use rustc::middle::expr_use_visitor::MutateMode; 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 as mc;
use rustc::middle::mem_categorization::Categorization; use rustc::middle::mem_categorization::Categorization;
use rustc::middle::region; use rustc::middle::region;
use rustc::middle::ty::{self, TyCtxt}; use rustc::ty::{self, TyCtxt};
use rustc::middle::traits::ProjectionMode; use rustc::traits::ProjectionMode;
use syntax::ast; use syntax::ast;
use syntax::codemap::Span; use syntax::codemap::Span;
use rustc_front::hir; use rustc_front::hir;

View File

@ -21,7 +21,7 @@ use borrowck::LoanPathElem::{LpDeref, LpInterior};
use borrowck::move_data::InvalidMovePathIndex; use borrowck::move_data::InvalidMovePathIndex;
use borrowck::move_data::{MoveData, MovePathIndex}; use borrowck::move_data::{MoveData, MovePathIndex};
use rustc::middle::def_id::{DefId}; 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 rustc::middle::mem_categorization as mc;
use std::mem; use std::mem;

View File

@ -18,7 +18,7 @@ use rustc::middle::expr_use_visitor as euv;
use rustc::middle::mem_categorization as mc; use rustc::middle::mem_categorization as mc;
use rustc::middle::mem_categorization::Categorization; use rustc::middle::mem_categorization::Categorization;
use rustc::middle::mem_categorization::InteriorOffsetKind as Kind; use rustc::middle::mem_categorization::InteriorOffsetKind as Kind;
use rustc::middle::ty; use rustc::ty;
use std::rc::Rc; use std::rc::Rc;
use syntax::ast; use syntax::ast;

View File

@ -16,7 +16,7 @@ use rustc::middle::expr_use_visitor as euv;
use rustc::middle::mem_categorization as mc; use rustc::middle::mem_categorization as mc;
use rustc::middle::mem_categorization::Categorization; use rustc::middle::mem_categorization::Categorization;
use rustc::middle::region; use rustc::middle::region;
use rustc::middle::ty; use rustc::ty;
use syntax::ast; use syntax::ast;
use syntax::codemap::Span; use syntax::codemap::Span;

View File

@ -19,12 +19,12 @@
use borrowck::*; use borrowck::*;
use borrowck::move_data::MoveData; use borrowck::move_data::MoveData;
use rustc::middle::expr_use_visitor as euv; 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 as mc;
use rustc::middle::mem_categorization::Categorization; use rustc::middle::mem_categorization::Categorization;
use rustc::middle::region; use rustc::middle::region;
use rustc::middle::ty::{self, TyCtxt}; use rustc::ty::{self, TyCtxt};
use rustc::middle::traits::ProjectionMode; use rustc::traits::ProjectionMode;
use syntax::ast; use syntax::ast;
use syntax::codemap::Span; use syntax::codemap::Span;

View File

@ -12,7 +12,7 @@ use borrowck::BorrowckCtxt;
use rustc::middle::mem_categorization as mc; use rustc::middle::mem_categorization as mc;
use rustc::middle::mem_categorization::Categorization; use rustc::middle::mem_categorization::Categorization;
use rustc::middle::mem_categorization::InteriorOffsetKind as Kind; use rustc::middle::mem_categorization::InteriorOffsetKind as Kind;
use rustc::middle::ty; use rustc::ty;
use syntax::ast; use syntax::ast;
use syntax::codemap; use syntax::codemap;
use syntax::errors::DiagnosticBuilder; use syntax::errors::DiagnosticBuilder;

View File

@ -14,7 +14,7 @@ use borrowck::*;
use rustc::middle::expr_use_visitor as euv; use rustc::middle::expr_use_visitor as euv;
use rustc::middle::mem_categorization as mc; use rustc::middle::mem_categorization as mc;
use rustc::middle::mem_categorization::Categorization; use rustc::middle::mem_categorization::Categorization;
use rustc::middle::ty; use rustc::ty;
use syntax::codemap::Span; use syntax::codemap::Span;
use borrowck::ToInteriorKind; use borrowck::ToInteriorKind;

View File

@ -10,7 +10,7 @@
use syntax::attr::AttrMetaMethods; use syntax::attr::AttrMetaMethods;
use rustc::middle::ty; use rustc::ty::TyCtxt;
use rustc::mir::repr::{self, Mir}; use rustc::mir::repr::{self, Mir};
use std::io; use std::io;
@ -459,7 +459,7 @@ impl<D: BitDenotation> DataflowState<D> {
impl<'tcx> DataflowState<MoveData<'tcx>> { 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); let move_data = MoveData::gather_moves(mir, tcx);
DataflowState::new(mir, move_data) DataflowState::new(mir, move_data)
} }

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use rustc::middle::ty::TyCtxt; use rustc::ty::TyCtxt;
use rustc::mir::repr::*; use rustc::mir::repr::*;
use rustc::util::nodemap::FnvHashMap; use rustc::util::nodemap::FnvHashMap;

View File

@ -23,7 +23,7 @@ use self::InteriorKind::*;
use rustc::dep_graph::DepNode; use rustc::dep_graph::DepNode;
use rustc::front::map as hir_map; use rustc::front::map as hir_map;
use rustc::front::map::blocks::FnParts; use rustc::front::map::blocks::FnParts;
use rustc::middle::cfg; use rustc::cfg;
use rustc::middle::dataflow::DataFlowContext; use rustc::middle::dataflow::DataFlowContext;
use rustc::middle::dataflow::BitwiseOperator; use rustc::middle::dataflow::BitwiseOperator;
use rustc::middle::dataflow::DataFlowOperator; 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 as mc;
use rustc::middle::mem_categorization::Categorization; use rustc::middle::mem_categorization::Categorization;
use rustc::middle::region; use rustc::middle::region;
use rustc::middle::ty::{self, Ty, TyCtxt}; use rustc::ty::{self, Ty, TyCtxt};
use std::fmt; use std::fmt;
use std::mem; use std::mem;

View File

@ -14,14 +14,14 @@
pub use self::MoveKind::*; pub use self::MoveKind::*;
use borrowck::*; use borrowck::*;
use rustc::middle::cfg; use rustc::cfg;
use rustc::middle::dataflow::DataFlowContext; use rustc::middle::dataflow::DataFlowContext;
use rustc::middle::dataflow::BitwiseOperator; use rustc::middle::dataflow::BitwiseOperator;
use rustc::middle::dataflow::DataFlowOperator; use rustc::middle::dataflow::DataFlowOperator;
use rustc::middle::dataflow::KillFrom; use rustc::middle::dataflow::KillFrom;
use rustc::middle::expr_use_visitor as euv; use rustc::middle::expr_use_visitor as euv;
use rustc::middle::expr_use_visitor::MutateMode; use rustc::middle::expr_use_visitor::MutateMode;
use rustc::middle::ty::TyCtxt; use rustc::ty::TyCtxt;
use rustc::util::nodemap::{FnvHashMap, NodeSet}; use rustc::util::nodemap::{FnvHashMap, NodeSet};
use std::cell::RefCell; use std::cell::RefCell;

View File

@ -14,13 +14,13 @@
pub use self::Variant::*; pub use self::Variant::*;
pub use rustc::middle::cfg::graphviz::{Node, Edge}; pub use rustc::cfg::graphviz::{Node, Edge};
use rustc::middle::cfg::graphviz as cfg_dot; use rustc::cfg::graphviz as cfg_dot;
use borrowck; use borrowck;
use borrowck::{BorrowckCtxt, LoanPath}; use borrowck::{BorrowckCtxt, LoanPath};
use dot; use dot;
use rustc::middle::cfg::CFGIndex; use rustc::cfg::CFGIndex;
use rustc::middle::dataflow::{DataFlowOperator, DataFlowContext, EntryOrExit}; use rustc::middle::dataflow::{DataFlowOperator, DataFlowContext, EntryOrExit};
use std::rc::Rc; use std::rc::Rc;
use dot::IntoCow; use dot::IntoCow;

View File

@ -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::config::{self, Input, OutputFilenames, OutputType};
use rustc::session::search_paths::PathKind; use rustc::session::search_paths::PathKind;
use rustc::lint; 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::privacy::AccessLevels;
use rustc::middle::ty::TyCtxt; use rustc::ty::{self, TyCtxt};
use rustc::util::common::time; use rustc::util::common::time;
use rustc::util::nodemap::NodeSet; use rustc::util::nodemap::NodeSet;
use rustc_back::sha2::{Sha256, Digest}; use rustc_back::sha2::{Sha256, Digest};

View File

@ -20,9 +20,9 @@ use rustc_trans::back::link;
use {driver, abort_on_err}; use {driver, abort_on_err};
use rustc::dep_graph::DepGraph; use rustc::dep_graph::DepGraph;
use rustc::middle::ty::{self, TyCtxt}; use rustc::ty::{self, TyCtxt};
use rustc::middle::cfg; use rustc::cfg;
use rustc::middle::cfg::graphviz::LabelledCFG; use rustc::cfg::graphviz::LabelledCFG;
use rustc::session::Session; use rustc::session::Session;
use rustc::session::config::Input; use rustc::session::config::Input;
use rustc_borrowck as borrowck; use rustc_borrowck as borrowck;

View File

@ -14,21 +14,21 @@ use driver;
use rustc::dep_graph::DepGraph; use rustc::dep_graph::DepGraph;
use rustc_lint; use rustc_lint;
use rustc_resolve as resolve; use rustc_resolve as resolve;
use rustc_typeck::middle::lang_items; use rustc::middle::lang_items;
use rustc_typeck::middle::free_region::FreeRegionMap; use rustc::middle::free_region::FreeRegionMap;
use rustc_typeck::middle::region::{self, CodeExtent}; use rustc::middle::region::{self, CodeExtent};
use rustc_typeck::middle::region::CodeExtentData; use rustc::middle::region::CodeExtentData;
use rustc_typeck::middle::resolve_lifetime; use rustc::middle::resolve_lifetime;
use rustc_typeck::middle::stability; use rustc::middle::stability;
use rustc_typeck::middle::ty::subst; use rustc::ty::subst;
use rustc_typeck::middle::ty::subst::Subst; use rustc::ty::subst::Subst;
use rustc_typeck::middle::traits::ProjectionMode; use rustc::traits::ProjectionMode;
use rustc_typeck::middle::ty::{self, Ty, TyCtxt, TypeFoldable}; use rustc::ty::{self, Ty, TyCtxt, TypeFoldable};
use rustc_typeck::middle::ty::relate::TypeRelation; use rustc::ty::relate::TypeRelation;
use rustc_typeck::middle::infer::{self, TypeOrigin}; use rustc::infer::{self, TypeOrigin};
use rustc_typeck::middle::infer::lub::Lub; use rustc::infer::lub::Lub;
use rustc_typeck::middle::infer::glb::Glb; use rustc::infer::glb::Glb;
use rustc_typeck::middle::infer::sub::Sub; use rustc::infer::sub::Sub;
use rustc_metadata::cstore::CStore; use rustc_metadata::cstore::CStore;
use rustc::front::map as hir_map; use rustc::front::map as hir_map;
use rustc::session::{self, config}; use rustc::session::{self, config};

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use middle::def::Def; use middle::def::Def;
use middle::ty; use rustc::ty;
use lint::{LateContext, LintContext, LintArray}; use lint::{LateContext, LintContext, LintArray};
use lint::{LintPass, LateLintPass}; use lint::{LintPass, LateLintPass};

Some files were not shown because too many files have changed in this diff Show More