1
Fork 0

Use newtype_index!-generated types more idiomatically

This commit is contained in:
Yotam Ofek 2025-04-14 15:52:25 +00:00
parent c580c498a1
commit 4b63362f3d
20 changed files with 61 additions and 87 deletions

View file

@ -355,7 +355,7 @@ where
// exist at all (see the FIXME at the start of this method), we have to deal with
// them for now.
delegate.instantiate_canonical_var_with_infer(info, span, |idx| {
ty::UniverseIndex::from(prev_universe.index() + idx.index())
prev_universe + idx.index()
})
} else if info.is_existential() {
// As an optimization we sometimes avoid creating a new inference variable here.