@@ -34,15 +34,15 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
3434 trait_def_id,
3535 impl_def_id
3636 ) ;
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 ( _) ) ;
3939 let may_apply = is_param && cx. tcx . infer_ctxt ( ) . enter ( |infcx| {
4040 let substs = infcx. fresh_substs_for_item ( DUMMY_SP , item_def_id) ;
4141 let ty = ty. subst ( infcx. tcx , substs) ;
4242 let param_env = EarlyBinder ( param_env) . subst ( infcx. tcx , substs) ;
4343
4444 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) ;
4646
4747 // Require the type the impl is implemented on to match
4848 // our type, and ignore the impl if there was a mismatch.
@@ -115,15 +115,15 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
115115 ) ,
116116 // FIXME(eddyb) compute both `trait_` and `for_` from
117117 // 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) ) ,
119119 for_ : ty. 0 . clean ( cx) ,
120120 items : cx. tcx
121121 . associated_items ( impl_def_id)
122122 . in_definition_order ( )
123123 . map ( |x| x. clean ( cx) )
124124 . collect :: < Vec < _ > > ( ) ,
125125 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) ) ,
127127 } ) ,
128128 cfg : None ,
129129 } ) ;
0 commit comments