@@ -418,7 +418,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
418
418
let opaque_type = tcx. mk_opaque ( def_id, opaque_defn. substs ) ;
419
419
420
420
let required_region_bounds =
421
- required_region_bounds ( tcx, opaque_type, bounds. predicates ) ;
421
+ required_region_bounds ( tcx, opaque_type, bounds. predicates . into_iter ( ) ) ;
422
422
debug_assert ! ( !required_region_bounds. is_empty( ) ) ;
423
423
424
424
for required_region in required_region_bounds {
@@ -1137,7 +1137,8 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> {
1137
1137
1138
1138
debug ! ( "instantiate_opaque_types: bounds={:?}" , bounds) ;
1139
1139
1140
- let required_region_bounds = required_region_bounds ( tcx, ty, bounds. predicates . clone ( ) ) ;
1140
+ let required_region_bounds =
1141
+ required_region_bounds ( tcx, ty, bounds. predicates . iter ( ) . cloned ( ) ) ;
1141
1142
debug ! ( "instantiate_opaque_types: required_region_bounds={:?}" , required_region_bounds) ;
1142
1143
1143
1144
// Make sure that we are in fact defining the *entire* type
@@ -1259,17 +1260,15 @@ pub fn may_define_opaque_type(
1259
1260
crate fn required_region_bounds (
1260
1261
tcx : TyCtxt < ' tcx > ,
1261
1262
erased_self_ty : Ty < ' tcx > ,
1262
- predicates : Vec < ty:: Predicate < ' tcx > > ,
1263
+ predicates : impl Iterator < Item = ty:: Predicate < ' tcx > > ,
1263
1264
) -> Vec < ty:: Region < ' tcx > > {
1264
- debug ! (
1265
- "required_region_bounds(erased_self_ty={:?}, predicates={:?})" ,
1266
- erased_self_ty, predicates
1267
- ) ;
1265
+ debug ! ( "required_region_bounds(erased_self_ty={:?})" , erased_self_ty) ;
1268
1266
1269
1267
assert ! ( !erased_self_ty. has_escaping_bound_vars( ) ) ;
1270
1268
1271
1269
traits:: elaborate_predicates ( tcx, predicates)
1272
1270
. filter_map ( |obligation| {
1271
+ debug ! ( "required_region_bounds(obligation={:?})" , obligation) ;
1273
1272
match obligation. predicate {
1274
1273
ty:: Predicate :: Projection ( ..)
1275
1274
| ty:: Predicate :: Trait ( ..)
0 commit comments