@@ -2059,7 +2059,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
20592059 ( _, Res :: SelfTyAlias { alias_to : impl_def_id, is_trait_impl : true , .. } ) => {
20602060 // `Self` in an impl of a trait -- we have a concrete self type and a
20612061 // 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 {
20632063 // A cycle error occurred, most likely.
20642064 let guar = tcx. sess . delay_span_bug ( span, "expected cycle error" ) ;
20652065 return Err ( guar) ;
@@ -2155,7 +2155,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
21552155 . is_accessible_from ( self . item_def_id ( ) , tcx)
21562156 && tcx. all_impls ( * trait_def_id)
21572157 . 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) ;
21592159 trait_ref. map_or ( false , |trait_ref| {
21602160 let impl_ = trait_ref. subst (
21612161 tcx,
@@ -2308,7 +2308,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
23082308 && tcx. impl_polarity ( impl_def_id) != ty:: ImplPolarity :: Negative
23092309 } )
23102310 . 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 ( ) )
23122312 // We don't care about blanket impls.
23132313 . filter ( |self_ty| !self_ty. has_non_region_param ( ) )
23142314 . map ( |self_ty| tcx. erase_regions ( self_ty) . to_string ( ) )
0 commit comments