diff options
| author | bors <bors@rust-lang.org> | 2021-11-29 19:26:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-11-29 19:26:50 +0000 |
| commit | f1edd0429582dd29cccacaf50fd134b05593bd9c (patch) | |
| tree | fc7c7d5cf467d21e4a0c1dade1f4ffad3dbd1b6f /compiler/rustc_borrowck | |
| parent | 7e15b235f62dce8a21e51c2eff6b2c0cde9b018e (diff) | |
| parent | a9174cf94e72378d7aa8c5eb4fb9d85f392c00df (diff) | |
| download | rust-1.57.0.tar.gz rust-1.57.0.zip | |
Auto merge of #91361 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum 1.57.0
[stable] 1.57.0 artifacts This is the standard beta->stable promotion, and includes a last-minute backports of: * #90044 via inclusion of #91220. * [beta] Don't treat unnormalized function arguments as well-formed #91242 r? `@Mark-Simulacrum`
Diffstat (limited to 'compiler/rustc_borrowck')
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/free_region_relations.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/free_region_relations.rs b/compiler/rustc_borrowck/src/type_check/free_region_relations.rs index 70c74940d62..84fa9bbca85 100644 --- a/compiler/rustc_borrowck/src/type_check/free_region_relations.rs +++ b/compiler/rustc_borrowck/src/type_check/free_region_relations.rs @@ -258,7 +258,6 @@ impl UniversalRegionRelationsBuilder<'cx, 'tcx> { debug!("build: input_or_output={:?}", ty); // We add implied bounds from both the unnormalized and normalized ty // See issue #87748 - let constraints_implied_1 = self.add_implied_bounds(ty); let TypeOpOutput { output: norm_ty, constraints: constraints1, .. } = self .param_env .and(type_op::normalize::Normalize::new(ty)) @@ -286,10 +285,9 @@ impl UniversalRegionRelationsBuilder<'cx, 'tcx> { // } // ``` // Both &Self::Bar and &() are WF - let constraints_implied_2 = - if ty != norm_ty { self.add_implied_bounds(norm_ty) } else { None }; + let constraints_implied = self.add_implied_bounds(norm_ty); normalized_inputs_and_output.push(norm_ty); - constraints1.into_iter().chain(constraints_implied_1).chain(constraints_implied_2) + constraints1.into_iter().chain(constraints_implied) }) .collect(); |
