about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-09-28 21:15:18 +0200
committerRalf Jung <post@ralfj.de>2024-09-28 21:15:18 +0200
commit921a5ef6d7d2f965dab5b1f8b896dfe042db231b (patch)
tree9663672b2c3ef3e22b83c4ebd1b4409e5a774e61 /compiler/rustc_mir_transform/src
parente6eb45143cc4dd236dacd6fd8dc74eb1ee6852b2 (diff)
downloadrust-921a5ef6d7d2f965dab5b1f8b896dfe042db231b.tar.gz
rust-921a5ef6d7d2f965dab5b1f8b896dfe042db231b.zip
try to get rid of mir::Const::normalize
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/jump_threading.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_mir_transform/src/jump_threading.rs b/compiler/rustc_mir_transform/src/jump_threading.rs
index 9d85b5ba5a7..91fbc91e1e7 100644
--- a/compiler/rustc_mir_transform/src/jump_threading.rs
+++ b/compiler/rustc_mir_transform/src/jump_threading.rs
@@ -516,9 +516,7 @@ impl<'a, 'tcx> TOFinder<'a, 'tcx> {
                     // Avoid handling them, though this could be extended in the future.
                     return;
                 }
-                let Some(value) =
-                    value.const_.normalize(self.tcx, self.param_env).try_to_scalar_int()
-                else {
+                let Some(value) = value.const_.try_eval_scalar_int(self.tcx, self.param_env) else {
                     return;
                 };
                 let conds = conditions.map(self.arena, |c| Condition {