@@ -159,14 +159,14 @@ fn implied_bounds_from_components(
159
159
) -> Vec < OutlivesBound < ' tcx > > {
160
160
sup_components
161
161
. into_iter ( )
162
- . flat_map ( |component| {
162
+ . filter_map ( |component| {
163
163
match component {
164
164
Component :: Region ( r) =>
165
- vec ! [ OutlivesBound :: RegionSubRegion ( sub_region, r) ] ,
165
+ Some ( OutlivesBound :: RegionSubRegion ( sub_region, r) ) ,
166
166
Component :: Param ( p) =>
167
- vec ! [ OutlivesBound :: RegionSubParam ( sub_region, p) ] ,
167
+ Some ( OutlivesBound :: RegionSubParam ( sub_region, p) ) ,
168
168
Component :: Projection ( p) =>
169
- vec ! [ OutlivesBound :: RegionSubProjection ( sub_region, p) ] ,
169
+ Some ( OutlivesBound :: RegionSubProjection ( sub_region, p) ) ,
170
170
Component :: EscapingProjection ( _) =>
171
171
// If the projection has escaping regions, don't
172
172
// try to infer any implied bounds even for its
@@ -176,9 +176,9 @@ fn implied_bounds_from_components(
176
176
// idea is that the WAY that the caller proves
177
177
// that may change in the future and we want to
178
178
// give ourselves room to get smarter here.
179
- vec ! [ ] ,
179
+ None ,
180
180
Component :: UnresolvedInferenceVariable ( ..) =>
181
- vec ! [ ] ,
181
+ None ,
182
182
}
183
183
} )
184
184
. collect ( )
0 commit comments