@@ -572,9 +572,9 @@ impl<'tcx> TypeFolder<'tcx> for ImplTraitInTraitCollector<'_, 'tcx> {
572572
573573 fn fold_ty ( & mut self , ty : Ty < ' tcx > ) -> Ty < ' tcx > {
574574 if let ty:: Projection ( proj) = ty. kind ( )
575- && self . tcx ( ) . def_kind ( proj. item_def_id ) == DefKind :: ImplTraitPlaceholder
575+ && self . tcx ( ) . def_kind ( proj. def_id ) == DefKind :: ImplTraitPlaceholder
576576 {
577- if let Some ( ( ty, _) ) = self . types . get ( & proj. item_def_id ) {
577+ if let Some ( ( ty, _) ) = self . types . get ( & proj. def_id ) {
578578 return * ty;
579579 }
580580 //FIXME(RPITIT): Deny nested RPITIT in substs too
@@ -586,9 +586,9 @@ impl<'tcx> TypeFolder<'tcx> for ImplTraitInTraitCollector<'_, 'tcx> {
586586 span : self . span ,
587587 kind : TypeVariableOriginKind :: MiscVariable ,
588588 } ) ;
589- self . types . insert ( proj. item_def_id , ( infer_ty, proj. substs ) ) ;
589+ self . types . insert ( proj. def_id , ( infer_ty, proj. substs ) ) ;
590590 // Recurse into bounds
591- for ( pred, pred_span) in self . tcx ( ) . bound_explicit_item_bounds ( proj. item_def_id ) . subst_iter_copied ( self . tcx ( ) , proj. substs ) {
591+ for ( pred, pred_span) in self . tcx ( ) . bound_explicit_item_bounds ( proj. def_id ) . subst_iter_copied ( self . tcx ( ) , proj. substs ) {
592592 let pred = pred. fold_with ( self ) ;
593593 let pred = self . ocx . normalize (
594594 & ObligationCause :: misc ( self . span , self . body_id ) ,
@@ -601,7 +601,7 @@ impl<'tcx> TypeFolder<'tcx> for ImplTraitInTraitCollector<'_, 'tcx> {
601601 ObligationCause :: new (
602602 self . span ,
603603 self . body_id ,
604- ObligationCauseCode :: BindingObligation ( proj. item_def_id , pred_span) ,
604+ ObligationCauseCode :: BindingObligation ( proj. def_id , pred_span) ,
605605 ) ,
606606 self . param_env ,
607607 pred,
@@ -1735,7 +1735,7 @@ pub fn check_type_bounds<'tcx>(
17351735 let mut predicates = param_env. caller_bounds ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
17361736 match impl_ty_value. kind ( ) {
17371737 ty:: Projection ( proj)
1738- if proj. item_def_id == trait_ty. def_id && proj. substs == rebased_substs =>
1738+ if proj. def_id == trait_ty. def_id && proj. substs == rebased_substs =>
17391739 {
17401740 // Don't include this predicate if the projected type is
17411741 // exactly the same as the projection. This can occur in
@@ -1747,7 +1747,7 @@ pub fn check_type_bounds<'tcx>(
17471747 ty:: Binder :: bind_with_vars (
17481748 ty:: ProjectionPredicate {
17491749 projection_ty : ty:: ProjectionTy {
1750- item_def_id : trait_ty. def_id ,
1750+ def_id : trait_ty. def_id ,
17511751 substs : rebased_substs,
17521752 } ,
17531753 term : impl_ty_value. into ( ) ,
0 commit comments