@@ -34,15 +34,15 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
34
34
trait_def_id,
35
35
impl_def_id
36
36
) ;
37
- let trait_ref = cx. tcx . impl_trait_ref ( impl_def_id) . unwrap ( ) ;
38
- let is_param = matches ! ( trait_ref. self_ty( ) . kind( ) , ty:: Param ( _) ) ;
37
+ let trait_ref = cx. tcx . bound_impl_trait_ref ( impl_def_id) . unwrap ( ) ;
38
+ let is_param = matches ! ( trait_ref. 0 . self_ty( ) . kind( ) , ty:: Param ( _) ) ;
39
39
let may_apply = is_param && cx. tcx . infer_ctxt ( ) . enter ( |infcx| {
40
40
let substs = infcx. fresh_substs_for_item ( DUMMY_SP , item_def_id) ;
41
41
let ty = ty. subst ( infcx. tcx , substs) ;
42
42
let param_env = EarlyBinder ( param_env) . subst ( infcx. tcx , substs) ;
43
43
44
44
let impl_substs = infcx. fresh_substs_for_item ( DUMMY_SP , impl_def_id) ;
45
- let trait_ref = EarlyBinder ( trait_ref) . subst ( infcx. tcx , impl_substs) ;
45
+ let trait_ref = trait_ref. subst ( infcx. tcx , impl_substs) ;
46
46
47
47
// Require the type the impl is implemented on to match
48
48
// our type, and ignore the impl if there was a mismatch.
@@ -115,15 +115,15 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
115
115
) ,
116
116
// FIXME(eddyb) compute both `trait_` and `for_` from
117
117
// the post-inference `trait_ref`, as it's more accurate.
118
- trait_ : Some ( trait_ref. clean ( cx) ) ,
118
+ trait_ : Some ( trait_ref. 0 . clean ( cx) ) ,
119
119
for_ : ty. 0 . clean ( cx) ,
120
120
items : cx. tcx
121
121
. associated_items ( impl_def_id)
122
122
. in_definition_order ( )
123
123
. map ( |x| x. clean ( cx) )
124
124
. collect :: < Vec < _ > > ( ) ,
125
125
polarity : ty:: ImplPolarity :: Positive ,
126
- kind : ImplKind :: Blanket ( box trait_ref. self_ty ( ) . clean ( cx) ) ,
126
+ kind : ImplKind :: Blanket ( box trait_ref. 0 . self_ty ( ) . clean ( cx) ) ,
127
127
} ) ,
128
128
cfg : None ,
129
129
} ) ;
0 commit comments