We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d03df0a commit bd6a96fCopy full SHA for bd6a96f
compiler/rustc_middle/src/thir.rs
@@ -1018,11 +1018,7 @@ impl<'tcx> PatRangeBoundary<'tcx> {
1018
(Finite(mir::Const::Ty(a)), Finite(mir::Const::Ty(b)))
1019
if matches!(ty.kind(), ty::Uint(_) | ty::Char) =>
1020
{
1021
- if let Some(a) = a.try_to_valtree() {
1022
- if let Some(b) = b.try_to_valtree() {
1023
- return Some(a.cmp(&b));
1024
- }
1025
+ return Some(a.to_valtree().cmp(&b.to_valtree()));
1026
}
1027
(
1028
Finite(mir::Const::Val(mir::ConstValue::Scalar(Scalar::Int(a)), _)),
0 commit comments