Rollup merge of #91243 - jackh726:issue-91068, r=nikomatsakis
Don't treat unnormalized function arguments as well-formed Partial revert of #88312 r? ``@pnkfelix`` cc ``@nikomatsakis``
This commit is contained in:
commit
6e7cf2e88b
8 changed files with 52 additions and 46 deletions
|
@ -256,7 +256,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))
|
||||
|
@ -284,10 +283,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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue