Don't treat unnormalized function arguments as well-formed
This commit is contained in:
parent
eee8b9c7ba
commit
eeaa215f85
7 changed files with 38 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