@@ -68,8 +68,9 @@ pub(super) fn infer_predicates(
6868 // Therefore mark `predicates_added` as true and which will ensure
6969 // we walk the crates again and re-calculate predicates for all
7070 // items.
71- let item_predicates_len: usize =
72- global_inferred_outlives. get ( & item_did. to_def_id ( ) ) . map_or ( 0 , |p| p. 0 . len ( ) ) ;
71+ let item_predicates_len: usize = global_inferred_outlives
72+ . get ( & item_did. to_def_id ( ) )
73+ . map_or ( 0 , |p| p. as_ref ( ) . skip_binder ( ) . len ( ) ) ;
7374 if item_required_predicates. len ( ) > item_predicates_len {
7475 predicates_added = true ;
7576 global_inferred_outlives
@@ -137,7 +138,9 @@ fn insert_required_predicates_to_be_wf<'tcx>(
137138 // 'a` holds for `Foo`.
138139 debug ! ( "Adt" ) ;
139140 if let Some ( unsubstituted_predicates) = global_inferred_outlives. get ( & def. did ( ) ) {
140- for ( unsubstituted_predicate, & span) in & unsubstituted_predicates. 0 {
141+ for ( unsubstituted_predicate, & span) in
142+ unsubstituted_predicates. as_ref ( ) . skip_binder ( )
143+ {
141144 // `unsubstituted_predicate` is `U: 'b` in the
142145 // example above. So apply the substitution to
143146 // get `T: 'a` (or `predicate`):
@@ -251,7 +254,7 @@ fn check_explicit_predicates<'tcx>(
251254 ) ;
252255 let explicit_predicates = explicit_map. explicit_predicates_of ( tcx, def_id) ;
253256
254- for ( outlives_predicate, & span) in & explicit_predicates. 0 {
257+ for ( outlives_predicate, & span) in explicit_predicates. as_ref ( ) . skip_binder ( ) {
255258 debug ! ( "outlives_predicate = {:?}" , & outlives_predicate) ;
256259
257260 // Careful: If we are inferring the effects of a `dyn Trait<..>`
0 commit comments