Skip to content

Commit 4076951

Browse files
committed
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.
1 parent f3a1bae commit 4076951

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

compiler/rustc_borrowck/src/type_check/canonical.rs

-7
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
6969
where
7070
T: TypeFoldable<TyCtxt<'tcx>>,
7171
{
72-
let old_universe = self.infcx.universe();
73-
7472
let (instantiated, _) =
7573
self.infcx.instantiate_canonical_with_fresh_inference_vars(span, canonical);
76-
77-
for u in (old_universe + 1)..=self.infcx.universe() {
78-
self.borrowck_context.constraints.universe_causes.insert(u, UniverseInfo::other());
79-
}
80-
8174
instantiated
8275
}
8376

0 commit comments

Comments
 (0)