mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Move infer out of middle::typeck
and into just middle
.
This commit is contained in:
parent
7c44561ad6
commit
db75f8aa91
@ -79,6 +79,7 @@ pub mod middle {
|
||||
pub mod fast_reject;
|
||||
pub mod graph;
|
||||
pub mod intrinsicck;
|
||||
pub mod infer;
|
||||
pub mod lang_items;
|
||||
pub mod liveness;
|
||||
pub mod mem_categorization;
|
||||
|
@ -28,9 +28,9 @@ use self::MethodContext::*;
|
||||
|
||||
use metadata::csearch;
|
||||
use middle::def::*;
|
||||
use middle::infer;
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::astconv::ast_ty_to_ty;
|
||||
use middle::typeck::infer;
|
||||
use middle::{def, pat_util, stability};
|
||||
use middle::const_eval::{eval_const_expr_partial, const_int, const_uint};
|
||||
use util::ppaux::{ty_to_string};
|
||||
|
@ -25,11 +25,11 @@
|
||||
//! for all lint attributes.
|
||||
use self::TargetLint::*;
|
||||
|
||||
use middle::infer;
|
||||
use middle::privacy::ExportedItems;
|
||||
use middle::subst;
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::astconv::AstConv;
|
||||
use middle::typeck::infer;
|
||||
use session::{early_error, Session};
|
||||
use lint::{Level, LevelSource, Lint, LintId, LintArray, LintPass, LintPassObject};
|
||||
use lint::{Default, CommandLine, Node, Allow, Warn, Deny, Forbid};
|
||||
|
@ -27,7 +27,7 @@ use self::Mode::*;
|
||||
|
||||
use middle::ty;
|
||||
use middle::def;
|
||||
use middle::typeck;
|
||||
use middle::infer;
|
||||
use middle::traits;
|
||||
use middle::mem_categorization as mc;
|
||||
use middle::expr_use_visitor as euv;
|
||||
@ -113,7 +113,7 @@ impl<'a, 'tcx> CheckStaticVisitor<'a, 'tcx> {
|
||||
|
||||
fn check_static_type(&self, e: &ast::Expr) {
|
||||
let ty = ty::node_id_to_type(self.tcx, e.id);
|
||||
let infcx = typeck::infer::new_infer_ctxt(self.tcx);
|
||||
let infcx = infer::new_infer_ctxt(self.tcx);
|
||||
let mut fulfill_cx = traits::FulfillmentContext::new();
|
||||
let cause = traits::ObligationCause::misc(DUMMY_SP);
|
||||
let obligation = traits::obligation_for_builtin_bound(self.tcx, cause, ty,
|
||||
|
@ -60,14 +60,15 @@
|
||||
//! sort of a minor point so I've opted to leave it for later---after all
|
||||
//! we may want to adjust precisely when coercions occur.
|
||||
|
||||
use super::{CoerceResult, resolve_type, Coercion};
|
||||
use super::combine::{CombineFields, Combine};
|
||||
use super::sub::Sub;
|
||||
use super::resolve::try_resolve_tvar_shallow;
|
||||
|
||||
use middle::subst;
|
||||
use middle::ty::{AutoPtr, AutoDerefRef, AdjustDerefRef, AutoUnsize, AutoUnsafe};
|
||||
use middle::ty::{mt};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::infer::{CoerceResult, resolve_type, Coercion};
|
||||
use middle::typeck::infer::combine::{CombineFields, Combine};
|
||||
use middle::typeck::infer::sub::Sub;
|
||||
use middle::typeck::infer::resolve::try_resolve_tvar_shallow;
|
||||
use util::ppaux;
|
||||
use util::ppaux::Repr;
|
||||
|
@ -32,6 +32,14 @@
|
||||
// is also useful to track which value is the "expected" value in
|
||||
// terms of error reporting.
|
||||
|
||||
use super::equate::Equate;
|
||||
use super::glb::Glb;
|
||||
use super::lub::Lub;
|
||||
use super::sub::Sub;
|
||||
use super::unify::InferCtxtMethodsForSimplyUnifiableTypes;
|
||||
use super::{InferCtxt, cres};
|
||||
use super::{MiscVariable, TypeTrace};
|
||||
use super::type_variable::{RelationDir, EqTo, SubtypeOf, SupertypeOf};
|
||||
|
||||
use middle::subst;
|
||||
use middle::subst::{ErasedRegions, NonerasedRegions, Substs};
|
||||
@ -40,15 +48,6 @@ use middle::ty::{IntType, UintType};
|
||||
use middle::ty::{BuiltinBounds};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::ty_fold;
|
||||
use middle::typeck::infer::equate::Equate;
|
||||
use middle::typeck::infer::glb::Glb;
|
||||
use middle::typeck::infer::lub::Lub;
|
||||
use middle::typeck::infer::sub::Sub;
|
||||
use middle::typeck::infer::unify::InferCtxtMethodsForSimplyUnifiableTypes;
|
||||
use middle::typeck::infer::{InferCtxt, cres};
|
||||
use middle::typeck::infer::{MiscVariable, TypeTrace};
|
||||
use middle::typeck::infer::type_variable::{RelationDir, EqTo,
|
||||
SubtypeOf, SupertypeOf};
|
||||
use middle::ty_fold::{TypeFoldable};
|
||||
use util::ppaux::Repr;
|
||||
|
@ -11,14 +11,14 @@
|
||||
use middle::ty::{BuiltinBounds};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::ty::TyVar;
|
||||
use middle::typeck::infer::combine::*;
|
||||
use middle::typeck::infer::{cres};
|
||||
use middle::typeck::infer::glb::Glb;
|
||||
use middle::typeck::infer::InferCtxt;
|
||||
use middle::typeck::infer::lub::Lub;
|
||||
use middle::typeck::infer::sub::Sub;
|
||||
use middle::typeck::infer::{TypeTrace, Subtype};
|
||||
use middle::typeck::infer::type_variable::{EqTo};
|
||||
use middle::infer::combine::*;
|
||||
use middle::infer::{cres};
|
||||
use middle::infer::glb::Glb;
|
||||
use middle::infer::InferCtxt;
|
||||
use middle::infer::lub::Lub;
|
||||
use middle::infer::sub::Sub;
|
||||
use middle::infer::{TypeTrace, Subtype};
|
||||
use middle::infer::type_variable::{EqTo};
|
||||
use util::ppaux::{Repr};
|
||||
|
||||
use syntax::ast::{Onceness, FnStyle};
|
@ -57,24 +57,25 @@
|
||||
|
||||
use self::FreshOrKept::*;
|
||||
|
||||
use super::InferCtxt;
|
||||
use super::TypeTrace;
|
||||
use super::SubregionOrigin;
|
||||
use super::RegionVariableOrigin;
|
||||
use super::ValuePairs;
|
||||
use super::region_inference::RegionResolutionError;
|
||||
use super::region_inference::ConcreteFailure;
|
||||
use super::region_inference::SubSupConflict;
|
||||
use super::region_inference::SupSupConflict;
|
||||
use super::region_inference::ParamBoundFailure;
|
||||
use super::region_inference::ProcessedErrors;
|
||||
use super::region_inference::SameRegions;
|
||||
|
||||
use std::collections::HashSet;
|
||||
use middle::def;
|
||||
use middle::infer;
|
||||
use middle::subst;
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::ty::{Region, ReFree};
|
||||
use middle::typeck::infer;
|
||||
use middle::typeck::infer::InferCtxt;
|
||||
use middle::typeck::infer::TypeTrace;
|
||||
use middle::typeck::infer::SubregionOrigin;
|
||||
use middle::typeck::infer::RegionVariableOrigin;
|
||||
use middle::typeck::infer::ValuePairs;
|
||||
use middle::typeck::infer::region_inference::RegionResolutionError;
|
||||
use middle::typeck::infer::region_inference::ConcreteFailure;
|
||||
use middle::typeck::infer::region_inference::SubSupConflict;
|
||||
use middle::typeck::infer::region_inference::SupSupConflict;
|
||||
use middle::typeck::infer::region_inference::ParamBoundFailure;
|
||||
use middle::typeck::infer::region_inference::ProcessedErrors;
|
||||
use middle::typeck::infer::region_inference::SameRegions;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::char::from_u32;
|
||||
use std::rc::Rc;
|
@ -8,17 +8,17 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use super::combine::*;
|
||||
use super::lattice::*;
|
||||
use super::equate::Equate;
|
||||
use super::higher_ranked::HigherRankedRelations;
|
||||
use super::lub::Lub;
|
||||
use super::sub::Sub;
|
||||
use super::{cres, InferCtxt};
|
||||
use super::{TypeTrace, Subtype};
|
||||
|
||||
use middle::ty::{BuiltinBounds};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::infer::combine::*;
|
||||
use middle::typeck::infer::lattice::*;
|
||||
use middle::typeck::infer::equate::Equate;
|
||||
use middle::typeck::infer::higher_ranked::HigherRankedRelations;
|
||||
use middle::typeck::infer::lub::Lub;
|
||||
use middle::typeck::infer::sub::Sub;
|
||||
use middle::typeck::infer::{cres, InferCtxt};
|
||||
use middle::typeck::infer::{TypeTrace, Subtype};
|
||||
use syntax::ast::{Many, Once, MutImmutable, MutMutable};
|
||||
use syntax::ast::{NormalFn, UnsafeFn};
|
||||
use syntax::ast::{Onceness, FnStyle};
|
@ -11,10 +11,11 @@
|
||||
//! Helper routines for higher-ranked things. See the `doc` module at
|
||||
//! the end of the file for details.
|
||||
|
||||
use super::{combine, cres, InferCtxt, HigherRankedType};
|
||||
use super::combine::Combine;
|
||||
use super::region_inference::{RegionMark};
|
||||
|
||||
use middle::ty::{mod, Ty, replace_late_bound_regions};
|
||||
use middle::typeck::infer::{mod, combine, cres, InferCtxt};
|
||||
use middle::typeck::infer::combine::Combine;
|
||||
use middle::typeck::infer::region_inference::{RegionMark};
|
||||
use middle::ty_fold::{mod, HigherRankedFoldable, TypeFoldable};
|
||||
use syntax::codemap::Span;
|
||||
use util::nodemap::FnvHashMap;
|
||||
@ -62,7 +63,7 @@ impl<'tcx,C> HigherRankedRelations<'tcx> for C
|
||||
let (a_prime, _) =
|
||||
self.infcx().replace_late_bound_regions_with_fresh_var(
|
||||
self.trace().origin.span(),
|
||||
infer::HigherRankedType,
|
||||
HigherRankedType,
|
||||
a);
|
||||
|
||||
// Second, we instantiate each bound region in the supertype with a
|
||||
@ -131,10 +132,10 @@ impl<'tcx,C> HigherRankedRelations<'tcx> for C
|
||||
let span = self.trace().origin.span();
|
||||
let (a_with_fresh, a_map) =
|
||||
self.infcx().replace_late_bound_regions_with_fresh_var(
|
||||
span, infer::HigherRankedType, a);
|
||||
span, HigherRankedType, a);
|
||||
let (b_with_fresh, _) =
|
||||
self.infcx().replace_late_bound_regions_with_fresh_var(
|
||||
span, infer::HigherRankedType, b);
|
||||
span, HigherRankedType, b);
|
||||
|
||||
// Collect constraints.
|
||||
let result0 =
|
||||
@ -221,10 +222,10 @@ impl<'tcx,C> HigherRankedRelations<'tcx> for C
|
||||
// Instantiate each bound region with a fresh region variable.
|
||||
let (a_with_fresh, a_map) =
|
||||
self.infcx().replace_late_bound_regions_with_fresh_var(
|
||||
self.trace().origin.span(), infer::HigherRankedType, a);
|
||||
self.trace().origin.span(), HigherRankedType, a);
|
||||
let (b_with_fresh, b_map) =
|
||||
self.infcx().replace_late_bound_regions_with_fresh_var(
|
||||
self.trace().origin.span(), infer::HigherRankedType, b);
|
||||
self.trace().origin.span(), HigherRankedType, b);
|
||||
let a_vars = var_ids(self, &a_map);
|
||||
let b_vars = var_ids(self, &b_map);
|
||||
|
@ -29,12 +29,13 @@
|
||||
//! over a `LatticeValue`, which is a value defined with respect to
|
||||
//! a lattice.
|
||||
|
||||
use super::*;
|
||||
use super::combine::*;
|
||||
use super::glb::Glb;
|
||||
use super::lub::Lub;
|
||||
|
||||
use middle::ty::{TyVar};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::infer::*;
|
||||
use middle::typeck::infer::combine::*;
|
||||
use middle::typeck::infer::glb::Glb;
|
||||
use middle::typeck::infer::lub::Lub;
|
||||
use util::ppaux::Repr;
|
||||
|
||||
pub trait LatticeDir<'tcx> {
|
@ -8,16 +8,17 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use super::combine::*;
|
||||
use super::equate::Equate;
|
||||
use super::glb::Glb;
|
||||
use super::higher_ranked::HigherRankedRelations;
|
||||
use super::lattice::*;
|
||||
use super::sub::Sub;
|
||||
use super::{cres, InferCtxt};
|
||||
use super::{TypeTrace, Subtype};
|
||||
|
||||
use middle::ty::{BuiltinBounds};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::infer::combine::*;
|
||||
use middle::typeck::infer::equate::Equate;
|
||||
use middle::typeck::infer::glb::Glb;
|
||||
use middle::typeck::infer::higher_ranked::HigherRankedRelations;
|
||||
use middle::typeck::infer::lattice::*;
|
||||
use middle::typeck::infer::sub::Sub;
|
||||
use middle::typeck::infer::{cres, InferCtxt};
|
||||
use middle::typeck::infer::{TypeTrace, Subtype};
|
||||
use syntax::ast::{Many, Once};
|
||||
use syntax::ast::{NormalFn, UnsafeFn};
|
||||
use syntax::ast::{Onceness, FnStyle};
|
@ -18,14 +18,14 @@ pub use self::RegionResolutionError::*;
|
||||
pub use self::VarValue::*;
|
||||
use self::Classification::*;
|
||||
|
||||
use super::cres;
|
||||
use super::{RegionVariableOrigin, SubregionOrigin, TypeTrace, MiscVariable};
|
||||
|
||||
use middle::region;
|
||||
use middle::ty;
|
||||
use middle::ty::{BoundRegion, FreeRegion, Region, RegionVid};
|
||||
use middle::ty::{ReEmpty, ReStatic, ReInfer, ReFree, ReEarlyBound};
|
||||
use middle::ty::{ReLateBound, ReScope, ReVar, ReSkolemized, BrFresh};
|
||||
use middle::typeck::infer::cres;
|
||||
use middle::typeck::infer::{RegionVariableOrigin, SubregionOrigin, TypeTrace};
|
||||
use middle::typeck::infer;
|
||||
use middle::graph;
|
||||
use middle::graph::{Direction, NodeIndex};
|
||||
use util::common::indenter;
|
||||
@ -573,7 +573,7 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> {
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
let c = self.new_region_var(infer::MiscVariable(origin.span()));
|
||||
let c = self.new_region_var(MiscVariable(origin.span()));
|
||||
self.combine_map(t).borrow_mut().insert(vars, c);
|
||||
if self.in_snapshot() {
|
||||
self.undo_log.borrow_mut().push(AddCombination(t, vars));
|
@ -48,12 +48,13 @@
|
||||
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
use super::{fixup_err, fres, InferCtxt};
|
||||
use super::{unresolved_int_ty,unresolved_float_ty,unresolved_ty};
|
||||
|
||||
use middle::ty::{FloatVar, FloatVid, IntVar, IntVid, RegionVid, TyVar, TyVid};
|
||||
use middle::ty::{IntType, UintType};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::ty_fold;
|
||||
use middle::typeck::infer::{fixup_err, fres, InferCtxt};
|
||||
use middle::typeck::infer::{unresolved_int_ty,unresolved_float_ty,unresolved_ty};
|
||||
use syntax::codemap::Span;
|
||||
use util::ppaux::{Repr, ty_to_string};
|
||||
|
@ -8,19 +8,19 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use super::combine::*;
|
||||
use super::{cres, CresCompare};
|
||||
use super::equate::Equate;
|
||||
use super::glb::Glb;
|
||||
use super::higher_ranked::HigherRankedRelations;
|
||||
use super::InferCtxt;
|
||||
use super::lub::Lub;
|
||||
use super::{TypeTrace, Subtype};
|
||||
use super::type_variable::{SubtypeOf, SupertypeOf};
|
||||
|
||||
use middle::ty::{BuiltinBounds};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::ty::TyVar;
|
||||
use middle::typeck::infer::combine::*;
|
||||
use middle::typeck::infer::{cres, CresCompare};
|
||||
use middle::typeck::infer::equate::Equate;
|
||||
use middle::typeck::infer::glb::Glb;
|
||||
use middle::typeck::infer::higher_ranked::HigherRankedRelations;
|
||||
use middle::typeck::infer::InferCtxt;
|
||||
use middle::typeck::infer::lub::Lub;
|
||||
use middle::typeck::infer::{TypeTrace, Subtype};
|
||||
use middle::typeck::infer::type_variable::{SubtypeOf, SupertypeOf};
|
||||
use util::ppaux::{Repr};
|
||||
|
||||
use syntax::ast::{Onceness, FnStyle, MutImmutable, MutMutable};
|
@ -14,8 +14,8 @@ use std::kinds::marker;
|
||||
|
||||
use middle::ty::{expected_found, IntVarValue};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::infer::{uok, ures};
|
||||
use middle::typeck::infer::InferCtxt;
|
||||
use middle::infer::{uok, ures};
|
||||
use middle::infer::InferCtxt;
|
||||
use std::cell::RefCell;
|
||||
use std::fmt::Show;
|
||||
use syntax::ast;
|
@ -17,7 +17,7 @@ use super::util;
|
||||
use middle::subst;
|
||||
use middle::subst::Subst;
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::infer::{mod, InferCtxt};
|
||||
use middle::infer::{mod, InferCtxt};
|
||||
use syntax::ast;
|
||||
use syntax::codemap::DUMMY_SP;
|
||||
use util::ppaux::Repr;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
use middle::mem_categorization::Typer;
|
||||
use middle::ty;
|
||||
use middle::typeck::infer::InferCtxt;
|
||||
use middle::infer::InferCtxt;
|
||||
use std::collections::HashSet;
|
||||
use std::rc::Rc;
|
||||
use util::ppaux::Repr;
|
||||
|
@ -18,7 +18,7 @@ pub use self::ObligationCauseCode::*;
|
||||
use middle::mem_categorization::Typer;
|
||||
use middle::subst;
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::infer::InferCtxt;
|
||||
use middle::infer::InferCtxt;
|
||||
use std::rc::Rc;
|
||||
use std::slice::Items;
|
||||
use syntax::ast;
|
||||
|
@ -30,8 +30,8 @@ use middle::fast_reject;
|
||||
use middle::mem_categorization::Typer;
|
||||
use middle::subst::{Subst, Substs, VecPerParamSpace};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::infer;
|
||||
use middle::typeck::infer::{InferCtxt, TypeSkolemizer};
|
||||
use middle::infer;
|
||||
use middle::infer::{InferCtxt, TypeSkolemizer};
|
||||
use middle::ty_fold::TypeFoldable;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::hash_map::HashMap;
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
use middle::subst;
|
||||
use middle::subst::{ParamSpace, Substs, VecPerParamSpace};
|
||||
use middle::typeck::infer::InferCtxt;
|
||||
use middle::infer::InferCtxt;
|
||||
use middle::ty::{mod, Ty};
|
||||
use std::collections::HashSet;
|
||||
use std::fmt;
|
||||
|
@ -14,7 +14,7 @@ use middle::subst::{Subst, Substs};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::check::{check_expr, check_expr_has_type, demand, FnCtxt};
|
||||
use middle::typeck::check::{instantiate_path, structurally_resolved_type, valid_range_bounds};
|
||||
use middle::typeck::infer::{mod, resolve};
|
||||
use middle::infer::{mod, resolve};
|
||||
use middle::typeck::require_same_types;
|
||||
use util::nodemap::FnvHashMap;
|
||||
|
||||
|
@ -14,10 +14,10 @@ use super::check_fn;
|
||||
use super::{Expectation, ExpectCastableToType, ExpectHasType, NoExpectation};
|
||||
use super::FnCtxt;
|
||||
|
||||
use middle::infer;
|
||||
use middle::subst;
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::astconv;
|
||||
use middle::typeck::infer;
|
||||
use middle::typeck::rscope::RegionScope;
|
||||
use syntax::abi;
|
||||
use syntax::ast;
|
||||
|
@ -11,9 +11,9 @@
|
||||
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::check::FnCtxt;
|
||||
use middle::typeck::infer;
|
||||
use middle::typeck::infer::resolve_type;
|
||||
use middle::typeck::infer::resolve::try_resolve_tvar_shallow;
|
||||
use middle::infer;
|
||||
use middle::infer::resolve_type;
|
||||
use middle::infer::resolve::try_resolve_tvar_shallow;
|
||||
|
||||
use std::result::{Err, Ok};
|
||||
use std::result;
|
||||
|
@ -16,7 +16,8 @@ use middle::ty::{mod, Ty};
|
||||
use middle::ty::{MethodCall, MethodCallee, MethodObject, MethodOrigin,
|
||||
MethodParam, MethodStatic, MethodTraitObject, MethodTypeParam};
|
||||
use middle::typeck::check::{mod, FnCtxt, NoPreference, PreferMutLvalue};
|
||||
use middle::typeck::infer::{mod, InferCtxt};
|
||||
use middle::infer;
|
||||
use middle::infer::InferCtxt;
|
||||
use middle::ty_fold::HigherRankedFoldable;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
|
@ -20,7 +20,7 @@ use middle::typeck::check::{FnCtxt};
|
||||
use middle::typeck::check::{impl_self_ty};
|
||||
use middle::typeck::check::vtable;
|
||||
use middle::typeck::check::vtable::select_new_fcx_obligations;
|
||||
use middle::typeck::infer;
|
||||
use middle::infer;
|
||||
use util::ppaux::{Repr, UserString};
|
||||
|
||||
use std::rc::Rc;
|
||||
|
@ -21,8 +21,8 @@ use middle::ty::{MethodObject};
|
||||
use middle::ty_fold::HigherRankedFoldable;
|
||||
use middle::typeck::check;
|
||||
use middle::typeck::check::{FnCtxt, NoPreference};
|
||||
use middle::typeck::infer;
|
||||
use middle::typeck::infer::InferCtxt;
|
||||
use middle::infer;
|
||||
use middle::infer::InferCtxt;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::{Span, DUMMY_SP};
|
||||
use std::collections::HashSet;
|
||||
|
@ -84,6 +84,7 @@ use self::TupleArgumentsFlag::*;
|
||||
|
||||
use session::Session;
|
||||
use middle::{const_eval, def, traits};
|
||||
use middle::infer;
|
||||
use middle::lang_items::IteratorItem;
|
||||
use middle::mem_categorization::{mod, McResult};
|
||||
use middle::pat_util::{mod, pat_id_map};
|
||||
@ -98,7 +99,7 @@ use middle::ty_fold::TypeFolder;
|
||||
use middle::typeck::astconv::{mod, ast_region_to_region, ast_ty_to_ty, AstConv};
|
||||
use middle::typeck::check::_match::pat_ctxt;
|
||||
use middle::typeck::rscope::RegionScope;
|
||||
use middle::typeck::{CrateCtxt, infer, lookup_def_ccx, no_params, require_same_types};
|
||||
use middle::typeck::{CrateCtxt, lookup_def_ccx, no_params, require_same_types};
|
||||
use middle::typeck::TypeAndSubsts;
|
||||
use middle::lang_items::TypeIdLangItem;
|
||||
use lint;
|
||||
|
@ -124,9 +124,9 @@ use middle::typeck::astconv::AstConv;
|
||||
use middle::typeck::check::FnCtxt;
|
||||
use middle::typeck::check::regionmanip;
|
||||
use middle::typeck::check::vtable;
|
||||
use middle::typeck::infer::resolve_and_force_all_but_regions;
|
||||
use middle::typeck::infer::resolve_type;
|
||||
use middle::typeck::infer;
|
||||
use middle::infer::resolve_and_force_all_but_regions;
|
||||
use middle::infer::resolve_type;
|
||||
use middle::infer;
|
||||
use middle::pat_util;
|
||||
use util::nodemap::{DefIdMap, NodeMap, FnvHashMap};
|
||||
use util::ppaux::{ty_to_string, Repr};
|
||||
|
@ -17,7 +17,7 @@ use middle::traits::{ObligationCause};
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::check::{FnCtxt,
|
||||
structurally_resolved_type};
|
||||
use middle::typeck::infer;
|
||||
use middle::infer;
|
||||
use std::rc::Rc;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
|
@ -19,9 +19,9 @@ use middle::ty::{mod, Ty, MethodCall, MethodCallee};
|
||||
use middle::ty_fold::{TypeFolder,TypeFoldable};
|
||||
use middle::typeck::astconv::AstConv;
|
||||
use middle::typeck::check::FnCtxt;
|
||||
use middle::typeck::infer::{force_all, resolve_all, resolve_region};
|
||||
use middle::typeck::infer::resolve_type;
|
||||
use middle::typeck::infer;
|
||||
use middle::infer::{force_all, resolve_all, resolve_region};
|
||||
use middle::infer::resolve_type;
|
||||
use middle::infer;
|
||||
use middle::typeck::write_substs_to_tcx;
|
||||
use middle::typeck::write_ty_to_tcx;
|
||||
use util::ppaux::Repr;
|
||||
|
@ -32,9 +32,9 @@ use middle::ty::type_is_ty_var;
|
||||
use middle::subst::Subst;
|
||||
use middle::ty;
|
||||
use middle::typeck::CrateCtxt;
|
||||
use middle::typeck::infer::combine::Combine;
|
||||
use middle::typeck::infer::InferCtxt;
|
||||
use middle::typeck::infer::{new_infer_ctxt, resolve_ivar, resolve_type};
|
||||
use middle::infer::combine::Combine;
|
||||
use middle::infer::InferCtxt;
|
||||
use middle::infer::{new_infer_ctxt, resolve_ivar, resolve_type};
|
||||
use std::collections::{HashSet};
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
@ -13,8 +13,7 @@
|
||||
|
||||
use middle::traits;
|
||||
use middle::ty;
|
||||
use middle::typeck::infer::{new_infer_ctxt};
|
||||
use middle::typeck::infer;
|
||||
use middle::infer::{mod, new_infer_ctxt};
|
||||
use syntax::ast::{DefId};
|
||||
use syntax::ast::{LOCAL_CRATE};
|
||||
use syntax::ast;
|
||||
|
@ -46,7 +46,7 @@ use middle::ty_fold::TypeFolder;
|
||||
use middle::typeck::astconv::{AstConv, ty_of_arg};
|
||||
use middle::typeck::astconv::{ast_ty_to_ty, ast_region_to_region};
|
||||
use middle::typeck::astconv;
|
||||
use middle::typeck::infer;
|
||||
use middle::infer;
|
||||
use middle::typeck::rscope::*;
|
||||
use middle::typeck::{CrateCtxt, lookup_def_tcx, no_params, write_ty_to_tcx};
|
||||
use middle::typeck;
|
||||
|
@ -63,6 +63,7 @@ independently:
|
||||
|
||||
use middle::def;
|
||||
use middle::resolve;
|
||||
use middle::infer;
|
||||
use middle::subst;
|
||||
use middle::subst::VecPerParamSpace;
|
||||
use middle::ty::{mod, Ty};
|
||||
@ -78,7 +79,6 @@ use syntax::{ast, ast_map, abi};
|
||||
pub mod check;
|
||||
pub mod rscope;
|
||||
pub mod astconv;
|
||||
pub mod infer;
|
||||
pub mod collect;
|
||||
pub mod coherence;
|
||||
pub mod variance;
|
||||
|
@ -30,7 +30,7 @@
|
||||
use driver::driver::CrateAnalysis;
|
||||
use session::Session;
|
||||
|
||||
use middle::{def, typeck};
|
||||
use middle::def;
|
||||
use middle::ty::{mod, Ty};
|
||||
|
||||
use std::cell::Cell;
|
||||
|
@ -21,10 +21,10 @@ use middle::stability;
|
||||
use middle::subst;
|
||||
use middle::subst::Subst;
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::typeck::infer::combine::Combine;
|
||||
use middle::typeck::infer;
|
||||
use middle::typeck::infer::lub::Lub;
|
||||
use middle::typeck::infer::glb::Glb;
|
||||
use middle::infer::combine::Combine;
|
||||
use middle::infer;
|
||||
use middle::infer::lub::Lub;
|
||||
use middle::infer::glb::Glb;
|
||||
use session::{mod,config};
|
||||
use syntax::{abi, ast, ast_map, ast_util};
|
||||
use syntax::codemap;
|
||||
|
@ -19,6 +19,7 @@ use llvm;
|
||||
use llvm::{ValueRef, BasicBlockRef, BuilderRef, ContextRef};
|
||||
use llvm::{True, False, Bool};
|
||||
use middle::def;
|
||||
use middle::infer;
|
||||
use middle::lang_items::LangItem;
|
||||
use middle::mem_categorization as mc;
|
||||
use middle::region;
|
||||
@ -36,7 +37,6 @@ use middle::traits;
|
||||
use middle::ty::{mod, Ty};
|
||||
use middle::ty_fold;
|
||||
use middle::ty_fold::TypeFoldable;
|
||||
use middle::typeck::infer;
|
||||
use util::ppaux::Repr;
|
||||
use util::nodemap::{DefIdMap, FnvHashMap, NodeMap};
|
||||
|
||||
|
@ -41,7 +41,6 @@ use middle::def;
|
||||
use middle::mem_categorization::Typer;
|
||||
use middle::subst::{mod, Subst};
|
||||
use trans::{_match, adt, asm, base, callee, closure, consts, controlflow};
|
||||
use trans::{debuginfo, glue, machine, meth, inline, tvec, type_of};
|
||||
use trans::base::*;
|
||||
use trans::build::*;
|
||||
use trans::cleanup::{mod, CleanupMethods};
|
||||
|
Loading…
Reference in New Issue
Block a user