From e9a566002dc3ca20920baa70ba3bf59c2798819a Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Mon, 20 Jan 2025 03:29:04 +0000 Subject: Get rid of mir::Const::from_ty_const --- compiler/rustc_pattern_analysis/src/rustc.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/rustc_pattern_analysis/src') 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 -- cgit 1.4.1-3-g733a5