@@ -572,9 +572,9 @@ impl<'tcx> TypeFolder<'tcx> for ImplTraitInTraitCollector<'_, 'tcx> {
572
572
573
573
fn fold_ty ( & mut self , ty : Ty < ' tcx > ) -> Ty < ' tcx > {
574
574
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
576
576
{
577
- if let Some ( ( ty, _) ) = self . types . get ( & proj. item_def_id ) {
577
+ if let Some ( ( ty, _) ) = self . types . get ( & proj. def_id ) {
578
578
return * ty;
579
579
}
580
580
//FIXME(RPITIT): Deny nested RPITIT in substs too
@@ -586,9 +586,9 @@ impl<'tcx> TypeFolder<'tcx> for ImplTraitInTraitCollector<'_, 'tcx> {
586
586
span : self . span ,
587
587
kind : TypeVariableOriginKind :: MiscVariable ,
588
588
} ) ;
589
- self . types . insert ( proj. item_def_id , ( infer_ty, proj. substs ) ) ;
589
+ self . types . insert ( proj. def_id , ( infer_ty, proj. substs ) ) ;
590
590
// 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 ) {
592
592
let pred = pred. fold_with ( self ) ;
593
593
let pred = self . ocx . normalize (
594
594
& ObligationCause :: misc ( self . span , self . body_id ) ,
@@ -601,7 +601,7 @@ impl<'tcx> TypeFolder<'tcx> for ImplTraitInTraitCollector<'_, 'tcx> {
601
601
ObligationCause :: new (
602
602
self . span ,
603
603
self . body_id ,
604
- ObligationCauseCode :: BindingObligation ( proj. item_def_id , pred_span) ,
604
+ ObligationCauseCode :: BindingObligation ( proj. def_id , pred_span) ,
605
605
) ,
606
606
self . param_env ,
607
607
pred,
@@ -1735,7 +1735,7 @@ pub fn check_type_bounds<'tcx>(
1735
1735
let mut predicates = param_env. caller_bounds ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
1736
1736
match impl_ty_value. kind ( ) {
1737
1737
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 =>
1739
1739
{
1740
1740
// Don't include this predicate if the projected type is
1741
1741
// exactly the same as the projection. This can occur in
@@ -1747,7 +1747,7 @@ pub fn check_type_bounds<'tcx>(
1747
1747
ty:: Binder :: bind_with_vars (
1748
1748
ty:: ProjectionPredicate {
1749
1749
projection_ty : ty:: ProjectionTy {
1750
- item_def_id : trait_ty. def_id ,
1750
+ def_id : trait_ty. def_id ,
1751
1751
substs : rebased_substs,
1752
1752
} ,
1753
1753
term : impl_ty_value. into ( ) ,
0 commit comments