about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-03-08 22:10:24 +0000
committerMichael Goulet <michael@errs.io>2023-03-09 17:24:07 +0000
commit1b6d6f92d1980d7f987fa0fe53cea8d8fb3209eb (patch)
tree11bfa301675cad40a76b1f5ace78a7e92afccc36 /compiler/rustc_trait_selection
parent3aea46979a103fc7415d6e211cc21734196adde5 (diff)
downloadrust-1b6d6f92d1980d7f987fa0fe53cea8d8fb3209eb.tar.gz
rust-1b6d6f92d1980d7f987fa0fe53cea8d8fb3209eb.zip
Fix canonicalizer bug for int/float vars too
Diffstat (limited to 'compiler/rustc_trait_selection')
-rw-r--r--compiler/rustc_trait_selection/src/solve/canonical/canonicalize.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/canonical/canonicalize.rs b/compiler/rustc_trait_selection/src/solve/canonical/canonicalize.rs
index 981a8f45e45..7ee4f332306 100644
--- a/compiler/rustc_trait_selection/src/solve/canonical/canonicalize.rs
+++ b/compiler/rustc_trait_selection/src/solve/canonical/canonicalize.rs
@@ -278,16 +278,16 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'_, 'tcx> {
                     Err(ui) => CanonicalVarKind::Ty(CanonicalTyVarKind::General(ui)),
                 }
             }
-            ty::Infer(ty::IntVar(_)) => {
-                let nt = self.infcx.shallow_resolve(t);
+            ty::Infer(ty::IntVar(vid)) => {
+                let nt = self.infcx.opportunistic_resolve_int_var(vid);
                 if nt != t {
                     return self.fold_ty(nt);
                 } else {
                     CanonicalVarKind::Ty(CanonicalTyVarKind::Int)
                 }
             }
-            ty::Infer(ty::FloatVar(_)) => {
-                let nt = self.infcx.shallow_resolve(t);
+            ty::Infer(ty::FloatVar(vid)) => {
+                let nt = self.infcx.opportunistic_resolve_float_var(vid);
                 if nt != t {
                     return self.fold_ty(nt);
                 } else {