1
Fork 0

Opportunistically resolve region var in canonicalizer

This commit is contained in:
Michael Goulet 2023-12-15 05:02:32 +00:00
parent 03515c6a22
commit 146e345d8b
7 changed files with 70 additions and 35 deletions

View file

@ -242,16 +242,10 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> TypeFolder<I>
ty::ReVar(vid) => {
assert_eq!(
self.infcx.root_lt_var(vid),
vid,
"region vid should have been resolved fully before canonicalization"
);
assert_eq!(
self.infcx.probe_lt_var(vid),
self.infcx.opportunistic_resolve_lt_var(vid),
None,
"region vid should have been resolved fully before canonicalization"
);
match self.canonicalize_mode {
CanonicalizeMode::Input => CanonicalVarKind::Region(ty::UniverseIndex::ROOT),
CanonicalizeMode::Response { .. } => {