don't normalize wf predicates
this allows us to soundly use unnormalized projections for wf
This commit is contained in:
parent
8d1fa7105b
commit
f25cb83296
26 changed files with 226 additions and 102 deletions
|
@ -351,4 +351,16 @@ impl<'cx, 'tcx> FallibleTypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
|
|||
mir::ConstantKind::Val(_, _) => constant.try_super_fold_with(self)?,
|
||||
})
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn try_fold_predicate(
|
||||
&mut self,
|
||||
p: ty::Predicate<'tcx>,
|
||||
) -> Result<ty::Predicate<'tcx>, Self::Error> {
|
||||
if p.allow_normalization() && needs_normalization(&p, self.param_env.reveal()) {
|
||||
p.try_super_fold_with(self)
|
||||
} else {
|
||||
Ok(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue