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
|
@ -619,6 +619,15 @@ impl<'a, 'b, 'tcx> TypeFolder<'tcx> for AssocTypeNormalizer<'a, 'b, 'tcx> {
|
|||
constant.eval(self.selcx.tcx(), self.param_env)
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn fold_predicate(&mut self, p: ty::Predicate<'tcx>) -> ty::Predicate<'tcx> {
|
||||
if p.allow_normalization() && needs_normalization(&p, self.param_env.reveal()) {
|
||||
p.super_fold_with(self)
|
||||
} else {
|
||||
p
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BoundVarReplacer<'me, 'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue