rename bound region instantiation
- `erase_late_bound_regions` -> `instantiate_bound_regions_with_erased` - `replace_late_bound_regions_X` -> `instantiate_bound_regions_X`
This commit is contained in:
@@ -1051,7 +1051,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
) {
|
||||
// The regions of a type don't affect the size of the type
|
||||
let tcx = self.tcx();
|
||||
let self_ty = tcx.erase_late_bound_regions(obligation.predicate.self_ty());
|
||||
let self_ty = tcx.instantiate_bound_regions_with_erased(obligation.predicate.self_ty());
|
||||
// We should erase regions from both the param-env and type, since both
|
||||
// may have infer regions. Specifically, after canonicalizing and instantiating,
|
||||
// early bound regions turn into region vars in both the new and old solver.
|
||||
|
||||
@@ -327,8 +327,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
// care about other regions. Erasing late-bound regions is equivalent
|
||||
// to instantiating the binder with placeholders then erasing those
|
||||
// placeholder regions.
|
||||
let predicate =
|
||||
self.tcx().erase_regions(self.tcx().erase_late_bound_regions(obligation.predicate));
|
||||
let predicate = self
|
||||
.tcx()
|
||||
.erase_regions(self.tcx().instantiate_bound_regions_with_erased(obligation.predicate));
|
||||
|
||||
let Some(assume) = rustc_transmute::Assume::from_const(
|
||||
self.infcx.tcx,
|
||||
|
||||
Reference in New Issue
Block a user