self.super_ty(ty);
}
- fn visit_canonical_ty(&mut self, ty: & $($mutability)* CanonicalTy<'tcx>) {
+ fn visit_user_ty(&mut self, ty: & $($mutability)* CanonicalTy<'tcx>) {
self.super_canonical_ty(ty);
}
c_ty: & $($mutability)* CanonicalTy<'tcx>,
location: Location) {
self.visit_place(place, PlaceContext::Validate, location);
- self.visit_canonical_ty(c_ty);
+ self.visit_user_ty(c_ty);
}
fn super_place(&mut self,
source_info: *source_info,
});
if let Some(user_ty) = user_ty {
- self.visit_canonical_ty(user_ty);
+ self.visit_user_ty(user_ty);
}
self.visit_source_info(source_info);
self.visit_source_scope(visibility_scope);
use rustc::ty::subst::Substs;
use rustc::ty::{self, CanonicalTy, ClosureSubsts, GeneratorSubsts, Ty, TypeFoldable};
-use rustc::mir::{BasicBlock, Location, Mir, Place, Statement, StatementKind};
+use rustc::mir::{BasicBlock, Location, Mir, Statement, StatementKind};
use rustc::mir::visit::{MutVisitor, TyContext};
use rustc::infer::{InferCtxt, NLLRegionVariableOrigin};
debug!("visit_ty: ty={:?}", ty);
}
+ fn visit_user_ty(&mut self, _ty: &mut CanonicalTy<'tcx>) {
+ // `user_ty` annotations represent the types that the user
+ // wrote in the progarm. We don't want to erase the regions
+ // from these types: rather, we want to add them as
+ // constraints at type-check time.
+ debug!("visit_user_ty: skipping renumber");
+ }
+
fn visit_substs(&mut self, substs: &mut &'tcx Substs<'tcx>, location: Location) {
debug!("visit_substs(substs={:?}, location={:?})", substs, location);
debug!("visit_closure_substs: substs={:?}", substs);
}
- fn visit_ascribe_user_ty(
- &mut self,
- _place: &mut Place<'tcx>,
- _variance: &mut ty::Variance,
- _c_ty: &mut CanonicalTy<'tcx>,
- _location: Location,
- ) {
- // User-assert-ty statements represent types that the user added explicitly.
- // We don't want to erase the regions from these types: rather, we want to
- // add them as constraints at type-check time.
- debug!("visit_user_assert_ty: skipping renumber");
- }
-
fn visit_statement(
&mut self,
block: BasicBlock,