@@ -68,8 +68,9 @@ pub(super) fn infer_predicates(
68
68
// Therefore mark `predicates_added` as true and which will ensure
69
69
// we walk the crates again and re-calculate predicates for all
70
70
// 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 ( ) ) ;
73
74
if item_required_predicates. len ( ) > item_predicates_len {
74
75
predicates_added = true ;
75
76
global_inferred_outlives
@@ -137,7 +138,9 @@ fn insert_required_predicates_to_be_wf<'tcx>(
137
138
// 'a` holds for `Foo`.
138
139
debug ! ( "Adt" ) ;
139
140
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
+ {
141
144
// `unsubstituted_predicate` is `U: 'b` in the
142
145
// example above. So apply the substitution to
143
146
// get `T: 'a` (or `predicate`):
@@ -251,7 +254,7 @@ fn check_explicit_predicates<'tcx>(
251
254
) ;
252
255
let explicit_predicates = explicit_map. explicit_predicates_of ( tcx, def_id) ;
253
256
254
- for ( outlives_predicate, & span) in & explicit_predicates. 0 {
257
+ for ( outlives_predicate, & span) in explicit_predicates. as_ref ( ) . skip_binder ( ) {
255
258
debug ! ( "outlives_predicate = {:?}" , & outlives_predicate) ;
256
259
257
260
// Careful: If we are inferring the effects of a `dyn Trait<..>`
0 commit comments