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> {
259259 // We add implied bounds from both the unnormalized and normalized ty
260260 // See issue #87748
261261 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
263263 . param_env
264264 . and ( type_op:: normalize:: Normalize :: new ( ty) )
265265 . fully_perform ( self . infcx )
@@ -286,8 +286,9 @@ impl UniversalRegionRelationsBuilder<'cx, 'tcx> {
286286 // }
287287 // ```
288288 // 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) ;
291292 constraints1. into_iter ( ) . chain ( constraints_implied_1) . chain ( constraints_implied_2)
292293 } )
293294 . collect ( ) ;
You can’t perform that action at this time.
0 commit comments