assert we never incorrectly canonicalize envs
This commit is contained in:
parent
c56efaedfa
commit
0830ce036f
1 changed files with 7 additions and 0 deletions
|
|
@ -574,6 +574,13 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> TypeFolder<I> for Canonicaliz
|
|||
}
|
||||
|
||||
fn fold_clauses(&mut self, c: I::Clauses) -> I::Clauses {
|
||||
match self.canonicalize_mode {
|
||||
CanonicalizeMode::Input { keep_static: true }
|
||||
| CanonicalizeMode::Response { max_input_universe: _ } => {}
|
||||
CanonicalizeMode::Input { keep_static: false } => {
|
||||
panic!("erasing 'static in env")
|
||||
}
|
||||
}
|
||||
if c.flags().intersects(NEEDS_CANONICAL) { c.super_fold_with(self) } else { c }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue