This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/rustc_borrowck/src/type_check Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ impl UniversalRegionRelationsBuilder<'cx, 'tcx> {
259
259
// We add implied bounds from both the unnormalized and normalized ty
260
260
// See issue #87748
261
261
let constraints_implied_1 = self . add_implied_bounds ( ty) ;
262
- let TypeOpOutput { output : ty , constraints : constraints1, .. } = self
262
+ let TypeOpOutput { output : norm_ty , constraints : constraints1, .. } = self
263
263
. param_env
264
264
. and ( type_op:: normalize:: Normalize :: new ( ty) )
265
265
. fully_perform ( self . infcx )
@@ -286,8 +286,9 @@ impl UniversalRegionRelationsBuilder<'cx, 'tcx> {
286
286
// }
287
287
// ```
288
288
// Both &Self::Bar and &() are WF
289
- let constraints_implied_2 = self . add_implied_bounds ( ty) ;
290
- normalized_inputs_and_output. push ( ty) ;
289
+ let constraints_implied_2 =
290
+ if ty != norm_ty { self . add_implied_bounds ( norm_ty) } else { None } ;
291
+ normalized_inputs_and_output. push ( norm_ty) ;
291
292
constraints1. into_iter ( ) . chain ( constraints_implied_1) . chain ( constraints_implied_2)
292
293
} )
293
294
. collect ( ) ;
You can’t perform that action at this time.
0 commit comments