Rename tcx.mk_re_*
=> Region::new_*
This commit is contained in:
parent
498553fc04
commit
e33e20824f
42 changed files with 291 additions and 233 deletions
|
@ -81,7 +81,7 @@ fn fn_sig_for_fn_abi<'tcx>(
|
|||
var: ty::BoundVar::from_usize(bound_vars.len() - 1),
|
||||
kind: ty::BoundRegionKind::BrEnv,
|
||||
};
|
||||
let env_region = tcx.mk_re_late_bound(ty::INNERMOST, br);
|
||||
let env_region = ty::Region::new_late_bound(tcx, ty::INNERMOST, br);
|
||||
let env_ty = tcx.closure_env_ty(def_id, substs, env_region).unwrap();
|
||||
|
||||
let sig = sig.skip_binder();
|
||||
|
@ -106,7 +106,7 @@ fn fn_sig_for_fn_abi<'tcx>(
|
|||
var: ty::BoundVar::from_usize(bound_vars.len() - 1),
|
||||
kind: ty::BoundRegionKind::BrEnv,
|
||||
};
|
||||
let env_ty = tcx.mk_mut_ref(tcx.mk_re_late_bound(ty::INNERMOST, br), ty);
|
||||
let env_ty = tcx.mk_mut_ref(ty::Region::new_late_bound(tcx, ty::INNERMOST, br), ty);
|
||||
|
||||
let pin_did = tcx.require_lang_item(LangItem::Pin, None);
|
||||
let pin_adt_ref = tcx.adt_def(pin_did);
|
||||
|
|
|
@ -287,12 +287,13 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ImplTraitInTraitFinder<'_, 'tcx> {
|
|||
let shifted_alias_ty = self.tcx.fold_regions(unshifted_alias_ty, |re, depth| {
|
||||
if let ty::ReLateBound(index, bv) = re.kind() {
|
||||
if depth != ty::INNERMOST {
|
||||
return self.tcx.mk_re_error_with_message(
|
||||
return ty::Region::new_error_with_message(
|
||||
self.tcx,
|
||||
DUMMY_SP,
|
||||
"we shouldn't walk non-predicate binders with `impl Trait`...",
|
||||
);
|
||||
}
|
||||
self.tcx.mk_re_late_bound(index.shifted_out_to_binder(self.depth), bv)
|
||||
ty::Region::new_late_bound(self.tcx, index.shifted_out_to_binder(self.depth), bv)
|
||||
} else {
|
||||
re
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue