diff options
| author | bors <bors@rust-lang.org> | 2024-09-29 19:40:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-29 19:40:50 +0000 |
| commit | 7608018cbdac9e55d0d13529cf43adc33d53efcf (patch) | |
| tree | af02eaa72810b5d4325bf422a993e4ad1ed33322 /compiler/rustc_mir_transform/src | |
| parent | 42ff2eedb0585e32e3e8da0e83ff82dd49987a2c (diff) | |
| parent | a0ae32d6a257c3756e934cd82e1e78158859eab5 (diff) | |
| download | rust-7608018cbdac9e55d0d13529cf43adc33d53efcf.tar.gz rust-7608018cbdac9e55d0d13529cf43adc33d53efcf.zip | |
Auto merge of #131029 - matthiaskrgr:rollup-rh66wir, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #123932 (restate GlobalAlloc method safety preconditions in terms of what the caller has to do for greater clarity) - #129003 (Improve Ord docs) - #130972 (stabilize const_cell_into_inner) - #130990 (try to get rid of mir::Const::normalize) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/jump_threading.rs | 4 |
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 { |
