@@ -820,24 +820,25 @@ where
820820 }
821821
822822 fn fold_ty ( & mut self , ty : Ty < ' tcx > ) -> Ty < ' tcx > {
823- if let & ty:: Alias ( proj @ ty:: AliasTy { kind : ty:: Projection { def_id } , .. } ) = ty. kind ( )
823+ if let & ty:: Alias ( ty:: AliasTy { kind : ty:: Projection { def_id } , args : proj_args, .. } ) =
824+ ty. kind ( )
824825 && self . cx ( ) . is_impl_trait_in_trait ( def_id)
825826 {
826827 if let Some ( ( ty, _) ) = self . types . get ( & def_id) {
827828 return * ty;
828829 }
829830 //FIXME(RPITIT): Deny nested RPITIT in args too
830- if proj . args . has_escaping_bound_vars ( ) {
831+ if proj_args . has_escaping_bound_vars ( ) {
831832 bug ! ( "FIXME(RPITIT): error here" ) ;
832833 }
833834 // Replace with infer var
834835 let infer_ty = self . ocx . infcx . next_ty_var ( self . span ) ;
835- self . types . insert ( def_id, ( infer_ty, proj . args ) ) ;
836+ self . types . insert ( def_id, ( infer_ty, proj_args ) ) ;
836837 // Recurse into bounds
837838 for ( pred, pred_span) in self
838839 . cx ( )
839840 . explicit_item_bounds ( def_id)
840- . iter_instantiated_copied ( self . cx ( ) , proj . args )
841+ . iter_instantiated_copied ( self . cx ( ) , proj_args )
841842 {
842843 let pred = pred. fold_with ( self ) ;
843844 let pred = self . ocx . normalize (
@@ -2707,8 +2708,8 @@ fn param_env_with_gat_bounds<'tcx>(
27072708 let bound_vars = tcx. mk_bound_variable_kinds ( & bound_vars) ;
27082709
27092710 match normalize_impl_ty. kind ( ) {
2710- & ty:: Alias ( proj @ ty:: AliasTy { kind : ty:: Projection { def_id } , .. } )
2711- if def_id == trait_ty. def_id && proj . args == rebased_args =>
2711+ & ty:: Alias ( ty:: AliasTy { kind : ty:: Projection { def_id } , args , .. } )
2712+ if def_id == trait_ty. def_id && args == rebased_args =>
27122713 {
27132714 // Don't include this predicate if the projected type is
27142715 // exactly the same as the projection. This can occur in
0 commit comments