In relate_tys, when creating new universes, insert missing universes as other
This commit is contained in:
parent
497ee321af
commit
0a3c6bb887
2 changed files with 43 additions and 3 deletions
|
@ -80,10 +80,15 @@ impl TypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, 'tcx> {
|
|||
}
|
||||
|
||||
fn create_next_universe(&mut self) -> ty::UniverseIndex {
|
||||
let info_universe =
|
||||
self.borrowck_context.constraints.universe_causes.push(self.universe_info.clone());
|
||||
let universe = self.infcx.create_next_universe();
|
||||
assert_eq!(info_universe, universe);
|
||||
// FIXME: If we relate tys after normalizing with late-bound regions, there will
|
||||
// be extra universes. A proper solution would be to somehow track those universes
|
||||
// during projection, but here we just treat those as "other"
|
||||
self.borrowck_context
|
||||
.constraints
|
||||
.universe_causes
|
||||
.ensure_contains_elem(universe, || UniverseInfo::other());
|
||||
self.borrowck_context.constraints.universe_causes[universe] = self.universe_info.clone();
|
||||
universe
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue