@@ -477,14 +477,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
477
477
// This is the "trait" (meaning, the predicate "proved" by this `impl`) which provides the `Self` type we care about.
478
478
// For the purposes of this function, we hope that it is a `struct` type, and that our current `expr` is a literal of
479
479
// 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 ) {
481
481
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 ) ,
484
484
)
485
485
} else {
486
486
self . tcx
487
- . impl_trait_ref ( obligation. impl_def_id )
487
+ . impl_trait_ref ( obligation. impl_or_alias_def_id )
488
488
. map ( |impl_def| impl_def. skip_binder ( ) )
489
489
// It is possible that this is absent. In this case, we make no progress.
490
490
. ok_or ( expr) ?
@@ -494,7 +494,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
494
494
let impl_self_ty: Ty < ' tcx > = impl_trait_self_ref. self_ty ( ) ;
495
495
496
496
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 ) ;
498
498
let Some ( impl_predicate_index) = obligation. impl_def_predicate_index else {
499
499
// We don't have the index, so we can only guess.
500
500
return Err ( expr) ;
0 commit comments