about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2023-08-31 11:10:54 +0000
committerRémy Rakic <remy.rakic+github@gmail.com>2023-08-31 11:10:54 +0000
commit407695132c64ce6dfb3d96b820c7f23b7f989601 (patch)
treec220eba96e4b03e7e37fc87907d65f9471adccbe /compiler
parentf3a1bae88c617330b8956818da3cea256336c1cf (diff)
downloadrust-407695132c64ce6dfb3d96b820c7f23b7f989601.tar.gz
rust-407695132c64ce6dfb3d96b820c7f23b7f989601.zip
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.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_borrowck/src/type_check/canonical.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/canonical.rs b/compiler/rustc_borrowck/src/type_check/canonical.rs
index 16f5e68a06f..b1ccaaae17c 100644
--- a/compiler/rustc_borrowck/src/type_check/canonical.rs
+++ b/compiler/rustc_borrowck/src/type_check/canonical.rs
@@ -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
     }