pub substs: Substs,
}
-pub struct ty_param_substs_and_ty {
- pub substs: Substs,
- pub ty: ty::t
-}
-
pub type type_cache = RefCell<DefIdMap<ty_param_bounds_and_ty>>;
pub type node_type_table = RefCell<HashMap<uint,t>>;
use middle::lang_items::FnMutTraitLangItem;
use rl = middle::resolve_lifetime;
use middle::subst::{Subst, Substs};
-use middle::subst;
-use middle::ty::ty_param_substs_and_ty;
use middle::ty;
+use middle::typeck::TypeAndSubsts;
+use middle::typeck::rscope;
+use middle::typeck::rscope::{RegionScope};
use middle::typeck::lookup_def_tcx;
use middle::typeck::rscope::RegionScope;
use middle::typeck::rscope;
rscope: &RS,
did: ast::DefId,
path: &ast::Path)
- -> ty_param_substs_and_ty
+ -> TypeAndSubsts
{
let tcx = this.tcx();
let ty::ty_param_bounds_and_ty {
let substs = ast_path_substs(this, rscope, &generics, None, path);
let ty = decl_ty.subst(tcx, &substs);
- ty_param_substs_and_ty { substs: substs, ty: ty }
+ TypeAndSubsts { substs: substs, ty: ty }
}
pub static NO_REGIONS: uint = 1;
use middle::typeck::{MethodStatic, MethodObject};
use middle::typeck::{param_index};
use middle::typeck::check::regionmanip::replace_late_bound_regions_in_fn_sig;
+use middle::typeck::TypeAndSubsts;
use util::common::indenter;
use util::ppaux;
use util::ppaux::Repr;
// variables for each parameter:
let span = self.self_expr.map_or(self.span, |e| e.span);
let vcx = self.fcx.vtable_context();
- let ty::ty_param_substs_and_ty {
+ let TypeAndSubsts {
substs: impl_substs,
ty: impl_ty
} = impl_self_ty(&vcx, span, impl_did);
use middle::subst;
use middle::subst::{Subst, Substs, VecPerParamSpace, ParamSpace};
use middle::ty::{FnSig, VariantInfo};
-use middle::ty::{ty_param_bounds_and_ty, ty_param_substs_and_ty};
+use middle::ty::{ty_param_bounds_and_ty};
use middle::ty::{ParamTy, Disr, ExprTyProvider};
use middle::ty;
use middle::ty_fold::TypeFolder;
use middle::typeck::no_params;
use middle::typeck::{require_same_types, vtable_map};
use middle::typeck::{MethodCall, MethodMap};
+use middle::typeck::{TypeAndSubsts};
use middle::lang_items::TypeIdLangItem;
use util::common::{block_query, indenter, loop_query};
use util::ppaux;
pub fn impl_self_ty(vcx: &VtableContext,
span: Span, // (potential) receiver for this impl
did: ast::DefId)
- -> ty_param_substs_and_ty {
+ -> TypeAndSubsts {
let tcx = vcx.tcx();
let ity = ty::lookup_item_type(tcx, did);
let substs = subst::Substs::new_type(tps, rps);
let substd_ty = raw_ty.subst(tcx, &substs);
- ty_param_substs_and_ty { substs: substs, ty: substd_ty }
+ TypeAndSubsts { substs: substs, ty: substd_ty }
}
// Only for fields! Returns <none> for methods>
use middle::typeck::{vtable_static, vtable_param, vtable_error};
use middle::typeck::{param_index};
use middle::typeck::MethodCall;
+use middle::typeck::TypeAndSubsts;
use middle::subst;
use middle::subst::{Subst, VecPerParamSpace};
use util::common::indenter;
// FIXME: document a bit more what this means
//
// FIXME(#5781) this should be mk_eqty not mk_subty
- let ty::ty_param_substs_and_ty {
+ let TypeAndSubsts {
substs: substs,
ty: for_ty
} = impl_self_ty(vcx, span, impl_did);
AutoObject
}
+pub struct TypeAndSubsts {
+ pub substs: subst::Substs,
+ pub ty: ty::t,
+}
+
impl MethodCall {
pub fn expr(id: ast::NodeId) -> MethodCall {
MethodCall {