remove dummy UniverseInfo causes from type checker instantiate_canonical_with_fresh_inference_vars

This was backfilling causes for the new universes that can be created by
the InferCtxt. We don't need to do that anymore: `other()` is the default when
there is no registered universe cause.
This commit is contained in:
Rémy Rakic 2023-08-31 11:10:54 +00:00
parent f3a1bae88c
commit 407695132c

View File

@ -69,15 +69,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
where
T: TypeFoldable<TyCtxt<'tcx>>,
{
let old_universe = self.infcx.universe();
let (instantiated, _) =
self.infcx.instantiate_canonical_with_fresh_inference_vars(span, canonical);
for u in (old_universe + 1)..=self.infcx.universe() {
self.borrowck_context.constraints.universe_causes.insert(u, UniverseInfo::other());
}
instantiated
}