diff options
Diffstat (limited to 'compiler/rustc_borrowck/src/type_check/free_region_relations.rs')
-rw-r--r-- | compiler/rustc_borrowck/src/type_check/free_region_relations.rs | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/free_region_relations.rs b/compiler/rustc_borrowck/src/type_check/free_region_relations.rs index 14cfc3613..82ff86247 100644 --- a/compiler/rustc_borrowck/src/type_check/free_region_relations.rs +++ b/compiler/rustc_borrowck/src/type_check/free_region_relations.rs @@ -85,7 +85,7 @@ impl UniversalRegionRelations<'_> { /// outlives `fr` and (b) is not local. /// /// (*) If there are multiple competing choices, we return all of them. - pub(crate) fn non_local_upper_bounds<'a>(&'a self, fr: RegionVid) -> Vec<RegionVid> { + pub(crate) fn non_local_upper_bounds(&self, fr: RegionVid) -> Vec<RegionVid> { debug!("non_local_upper_bound(fr={:?})", fr); let res = self.non_local_bounds(&self.inverse_outlives, fr); assert!(!res.is_empty(), "can't find an upper bound!?"); @@ -98,7 +98,7 @@ impl UniversalRegionRelations<'_> { let upper_bounds = self.non_local_upper_bounds(fr); // In case we find more than one, reduce to one for - // convenience. This is to prevent us from generating more + // convenience. This is to prevent us from generating more // complex constraints, but it will cause spurious errors. let post_dom = self.inverse_outlives.mutual_immediate_postdominator(upper_bounds); @@ -128,7 +128,7 @@ impl UniversalRegionRelations<'_> { let lower_bounds = self.non_local_bounds(&self.outlives, fr); // In case we find more than one, reduce to one for - // convenience. This is to prevent us from generating more + // convenience. This is to prevent us from generating more // complex constraints, but it will cause spurious errors. let post_dom = self.outlives.mutual_immediate_postdominator(lower_bounds); @@ -148,9 +148,9 @@ impl UniversalRegionRelations<'_> { /// Helper for `non_local_upper_bounds` and `non_local_lower_bounds`. /// Repeatedly invokes `postdom_parent` until we find something that is not /// local. Returns `None` if we never do so. - fn non_local_bounds<'a>( + fn non_local_bounds( &self, - relation: &'a TransitiveRelation<RegionVid>, + relation: &TransitiveRelation<RegionVid>, fr0: RegionVid, ) -> Vec<RegionVid> { // This method assumes that `fr0` is one of the universally @@ -359,14 +359,9 @@ impl<'tcx> UniversalRegionRelationsBuilder<'_, 'tcx> { .insert(ty::OutlivesPredicate(GenericKind::Param(param_b), r_a)); } - OutlivesBound::RegionSubProjection(r_a, projection_b) => { + OutlivesBound::RegionSubAlias(r_a, alias_b) => { self.region_bound_pairs - .insert(ty::OutlivesPredicate(GenericKind::Projection(projection_b), r_a)); - } - - OutlivesBound::RegionSubOpaque(r_a, def_id, substs) => { - self.region_bound_pairs - .insert(ty::OutlivesPredicate(GenericKind::Opaque(def_id, substs), r_a)); + .insert(ty::OutlivesPredicate(GenericKind::Alias(alias_b), r_a)); } } } |