Get rid of mir::Const::from_ty_const
This commit is contained in:
parent
9a1d156f38
commit
e9a566002d
10 changed files with 21 additions and 98 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue