@@ -477,14 +477,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
477477 // This is the "trait" (meaning, the predicate "proved" by this `impl`) which provides the `Self` type we care about.
478478 // For the purposes of this function, we hope that it is a `struct` type, and that our current `expr` is a literal of
479479 // that struct type.
480- let impl_trait_self_ref = if self . tcx . is_trait_alias ( obligation. impl_def_id ) {
480+ let impl_trait_self_ref = if self . tcx . is_trait_alias ( obligation. impl_or_alias_def_id ) {
481481 self . tcx . mk_trait_ref (
482- obligation. impl_def_id ,
483- ty:: InternalSubsts :: identity_for_item ( self . tcx , obligation. impl_def_id ) ,
482+ obligation. impl_or_alias_def_id ,
483+ ty:: InternalSubsts :: identity_for_item ( self . tcx , obligation. impl_or_alias_def_id ) ,
484484 )
485485 } else {
486486 self . tcx
487- . impl_trait_ref ( obligation. impl_def_id )
487+ . impl_trait_ref ( obligation. impl_or_alias_def_id )
488488 . map ( |impl_def| impl_def. skip_binder ( ) )
489489 // It is possible that this is absent. In this case, we make no progress.
490490 . ok_or ( expr) ?
@@ -494,7 +494,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
494494 let impl_self_ty: Ty < ' tcx > = impl_trait_self_ref. self_ty ( ) ;
495495
496496 let impl_predicates: ty:: GenericPredicates < ' tcx > =
497- self . tcx . predicates_of ( obligation. impl_def_id ) ;
497+ self . tcx . predicates_of ( obligation. impl_or_alias_def_id ) ;
498498 let Some ( impl_predicate_index) = obligation. impl_def_predicate_index else {
499499 // We don't have the index, so we can only guess.
500500 return Err ( expr) ;
0 commit comments