summary refs log tree commit diff
path: root/compiler/rustc_next_trait_solver/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-03-22 16:35:44 -0400
committerMichael Goulet <michael@errs.io>2024-03-22 16:35:50 -0400
commit1fcf2eaa9f5ff9336e9b43f017eaf261acfdc2d3 (patch)
treeeb13cb9ae0b8ac2942df7cfe12f99fc7ee732d75 /compiler/rustc_next_trait_solver/src
parent1447f9d38ca388ca178a544534b3cff72945fa1e (diff)
downloadrust-1fcf2eaa9f5ff9336e9b43f017eaf261acfdc2d3.tar.gz
rust-1fcf2eaa9f5ff9336e9b43f017eaf261acfdc2d3.zip
Uniquify ReError on input mode in canonicalizer
Diffstat (limited to 'compiler/rustc_next_trait_solver/src')
-rw-r--r--compiler/rustc_next_trait_solver/src/canonicalizer.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_next_trait_solver/src/canonicalizer.rs b/compiler/rustc_next_trait_solver/src/canonicalizer.rs
index 95b30066662..2dbb44bdee2 100644
--- a/compiler/rustc_next_trait_solver/src/canonicalizer.rs
+++ b/compiler/rustc_next_trait_solver/src/canonicalizer.rs
@@ -239,7 +239,7 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> TypeFolder<I>
             // FIXME: We should investigate the perf implications of not uniquifying
             // `ReErased`. We may be able to short-circuit registering region
             // obligations if we encounter a `ReErased` on one side, for example.
-            ty::ReStatic | ty::ReErased => match self.canonicalize_mode {
+            ty::ReStatic | ty::ReErased | ty::ReError(_) => match self.canonicalize_mode {
                 CanonicalizeMode::Input => CanonicalVarKind::Region(ty::UniverseIndex::ROOT),
                 CanonicalizeMode::Response { .. } => return r,
             },
@@ -277,7 +277,6 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> TypeFolder<I>
                     }
                 }
             }
-            ty::ReError(_) => return r,
         };
 
         let existing_bound_var = match self.canonicalize_mode {