@@ -159,14 +159,14 @@ fn implied_bounds_from_components(
159159) -> Vec < OutlivesBound < ' tcx > > {
160160 sup_components
161161 . into_iter ( )
162- . flat_map ( |component| {
162+ . filter_map ( |component| {
163163 match component {
164164 Component :: Region ( r) =>
165- vec ! [ OutlivesBound :: RegionSubRegion ( sub_region, r) ] ,
165+ Some ( OutlivesBound :: RegionSubRegion ( sub_region, r) ) ,
166166 Component :: Param ( p) =>
167- vec ! [ OutlivesBound :: RegionSubParam ( sub_region, p) ] ,
167+ Some ( OutlivesBound :: RegionSubParam ( sub_region, p) ) ,
168168 Component :: Projection ( p) =>
169- vec ! [ OutlivesBound :: RegionSubProjection ( sub_region, p) ] ,
169+ Some ( OutlivesBound :: RegionSubProjection ( sub_region, p) ) ,
170170 Component :: EscapingProjection ( _) =>
171171 // If the projection has escaping regions, don't
172172 // try to infer any implied bounds even for its
@@ -176,9 +176,9 @@ fn implied_bounds_from_components(
176176 // idea is that the WAY that the caller proves
177177 // that may change in the future and we want to
178178 // give ourselves room to get smarter here.
179- vec ! [ ] ,
179+ None ,
180180 Component :: UnresolvedInferenceVariable ( ..) =>
181- vec ! [ ] ,
181+ None ,
182182 }
183183 } )
184184 . collect ( )
0 commit comments