about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorBoxy <rust@boxyuwu.dev>2025-01-29 16:46:09 +0000
committerGitHub <noreply@github.com>2025-01-29 16:46:09 +0000
commit0b4890851287f7552e25beb43ab67243a87a1ff4 (patch)
tree6b28cb50611b2bbcca661aaef967dd4a6eb7f26f /compiler/rustc_pattern_analysis/src
parentbec4359db9bf5fd3c6e9d4a88d26dcf091b3c82a (diff)
parent815c5d4eee36e836c7b75aa9288a58c4e8e7830b (diff)
downloadrust-0b4890851287f7552e25beb43ab67243a87a1ff4.tar.gz
rust-0b4890851287f7552e25beb43ab67243a87a1ff4.zip
Rustc pull
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
-rw-r--r--compiler/rustc_pattern_analysis/src/rustc.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs
index ae991e3ce40..2694cf472f4 100644
--- a/compiler/rustc_pattern_analysis/src/rustc.rs
+++ b/compiler/rustc_pattern_analysis/src/rustc.rs
@@ -794,9 +794,7 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> {
                 // fictitious values after `{u,i}size::MAX` (see [`IntRange::split`] for why we do
                 // this). We show this to the user as `usize::MAX..` which is slightly incorrect but
                 // probably clear enough.
-                let c = ty.numeric_max_val(cx.tcx).unwrap();
-                let value = mir::Const::from_ty_const(c, ty.0, cx.tcx);
-                lo = PatRangeBoundary::Finite(value);
+                lo = PatRangeBoundary::Finite(ty.numeric_max_val(cx.tcx).unwrap());
             }
             let hi = if let Some(hi) = range.hi.minus_one() {
                 hi