summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/rustc.rs
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2024-06-03 04:46:24 +0100
committerBoxy <supbscripter@gmail.com>2024-06-05 22:25:41 +0100
commit60a5bebbe591f228bf83f3c48f5f60fe87dedaad (patch)
treed3128a0145a3eccf78ca641585cc094d320bbadf /compiler/rustc_pattern_analysis/src/rustc.rs
parent8d6705cdb8e6da72c61dfd0feb80ec4061d448bd (diff)
downloadrust-60a5bebbe591f228bf83f3c48f5f60fe87dedaad.tar.gz
rust-60a5bebbe591f228bf83f3c48f5f60fe87dedaad.zip
Add `Ty` to `mir::Const::Ty`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/rustc.rs')
-rw-r--r--compiler/rustc_pattern_analysis/src/rustc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs
index ff68dd81bea..81c5f355231 100644
--- a/compiler/rustc_pattern_analysis/src/rustc.rs
+++ b/compiler/rustc_pattern_analysis/src/rustc.rs
@@ -737,7 +737,7 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> {
                 // 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, cx.tcx);
+                let value = mir::Const::from_ty_const(c, ty.0, cx.tcx);
                 lo = PatRangeBoundary::Finite(value);
             }
             let hi = if let Some(hi) = range.hi.minus_one() {