Neither require nor imply lifetime bounds on opaque type for well formedness

This commit is contained in:
Oli Scherer 2022-05-18 16:01:10 +00:00
parent c8ecf09a25
commit 37928f5986
30 changed files with 497 additions and 42 deletions

View file

@ -153,6 +153,9 @@ fn implied_bounds_from_components<'tcx>(
Component::Region(r) => Some(OutlivesBound::RegionSubRegion(sub_region, r)),
Component::Param(p) => Some(OutlivesBound::RegionSubParam(sub_region, p)),
Component::Projection(p) => Some(OutlivesBound::RegionSubProjection(sub_region, p)),
Component::Opaque(def_id, substs) => {
Some(OutlivesBound::RegionSubOpaque(sub_region, def_id, substs))
}
Component::EscapingProjection(_) =>
// If the projection has escaping regions, don't
// try to infer any implied bounds even for its