@@ -2059,7 +2059,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2059
2059
( _, Res :: SelfTyAlias { alias_to : impl_def_id, is_trait_impl : true , .. } ) => {
2060
2060
// `Self` in an impl of a trait -- we have a concrete self type and a
2061
2061
// trait reference.
2062
- let Some ( trait_ref) = tcx. bound_impl_trait_ref ( impl_def_id) else {
2062
+ let Some ( trait_ref) = tcx. impl_trait_ref ( impl_def_id) else {
2063
2063
// A cycle error occurred, most likely.
2064
2064
let guar = tcx. sess . delay_span_bug ( span, "expected cycle error" ) ;
2065
2065
return Err ( guar) ;
@@ -2155,7 +2155,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2155
2155
. is_accessible_from ( self . item_def_id ( ) , tcx)
2156
2156
&& tcx. all_impls ( * trait_def_id)
2157
2157
. any ( |impl_def_id| {
2158
- let trait_ref = tcx. bound_impl_trait_ref ( impl_def_id) ;
2158
+ let trait_ref = tcx. impl_trait_ref ( impl_def_id) ;
2159
2159
trait_ref. map_or ( false , |trait_ref| {
2160
2160
let impl_ = trait_ref. subst (
2161
2161
tcx,
@@ -2308,7 +2308,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2308
2308
&& tcx. impl_polarity ( impl_def_id) != ty:: ImplPolarity :: Negative
2309
2309
} )
2310
2310
. filter_map ( |impl_def_id| tcx. impl_trait_ref ( impl_def_id) )
2311
- . map ( |impl_| impl_. self_ty ( ) )
2311
+ . map ( |impl_| impl_. subst_identity ( ) . self_ty ( ) )
2312
2312
// We don't care about blanket impls.
2313
2313
. filter ( |self_ty| !self_ty. has_non_region_param ( ) )
2314
2314
. map ( |self_ty| tcx. erase_regions ( self_ty) . to_string ( ) )
0 commit comments