X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_mir_build%2Fsrc%2Fbuild%2Fmatches%2Fsimplify.rs;h=7f53d9dd70502ad10b0f567efdd81d9e77a9f3fa;hb=ac60db231c96738b874fb31a755ef49a0d71926c;hp=895df5808dbe16c6eb0cbb2abbeecab6d35c9598;hpb=b38077ea0b9021cf69401289f23951f96d996129;p=rust.git diff --git a/compiler/rustc_mir_build/src/build/matches/simplify.rs b/compiler/rustc_mir_build/src/build/matches/simplify.rs index 895df5808db..7f53d9dd705 100644 --- a/compiler/rustc_mir_build/src/build/matches/simplify.rs +++ b/compiler/rustc_mir_build/src/build/matches/simplify.rs @@ -228,7 +228,9 @@ fn simplify_match_pair<'pat>( _ => (None, 0), }; if let Some((min, max, sz)) = range { - if let (Some(lo), Some(hi)) = (lo.try_to_bits(sz), hi.try_to_bits(sz)) { + if let (Some(lo), Some(hi)) = + (lo.val().try_to_bits(sz), hi.val().try_to_bits(sz)) + { // We want to compare ranges numerically, but the order of the bitwise // representation of signed integers does not match their numeric order. // Thus, to correct the ordering, we need to shift the range of signed