@@ -139,7 +139,6 @@ impl Constant {
139
139
. find ( |r| r. map_or ( true , |o| o != Ordering :: Equal ) )
140
140
. unwrap_or_else ( || Some ( l. len ( ) . cmp ( & r. len ( ) ) ) ) ,
141
141
( & Self :: Repeat ( ref lv, ref ls) , & Self :: Repeat ( ref rv, ref rs) ) => {
142
- #[ allow( clippy:: match_wildcard_for_single_variants) ]
143
142
match Self :: partial_cmp ( tcx, cmp_type, lv, rv) {
144
143
Some ( Equal ) => Some ( ls. cmp ( rs) ) ,
145
144
x => x,
@@ -355,14 +354,14 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
355
354
( Some ( Constant :: Vec ( vec) ) , Some ( Constant :: Int ( index) ) ) => match vec. get ( index as usize ) {
356
355
Some ( Constant :: F32 ( x) ) => Some ( Constant :: F32 ( * x) ) ,
357
356
Some ( Constant :: F64 ( x) ) => Some ( Constant :: F64 ( * x) ) ,
358
- Some ( _ ) | None => None ,
357
+ _ => None ,
359
358
} ,
360
359
( Some ( Constant :: Vec ( vec) ) , _) => {
361
360
if !vec. is_empty ( ) && vec. iter ( ) . all ( |x| * x == vec[ 0 ] ) {
362
361
match vec. get ( 0 ) {
363
362
Some ( Constant :: F32 ( x) ) => Some ( Constant :: F32 ( * x) ) ,
364
363
Some ( Constant :: F64 ( x) ) => Some ( Constant :: F64 ( * x) ) ,
365
- Some ( _ ) | None => None ,
364
+ _ => None ,
366
365
}
367
366
} else {
368
367
None
@@ -533,7 +532,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
533
532
} )
534
533
. collect :: < Option < Vec < Constant > > > ( )
535
534
. map ( Constant :: Vec ) ,
536
- Some ( _ ) | None => None ,
535
+ _ => None ,
537
536
} ,
538
537
ty:: Float ( FloatTy :: F64 ) => match miri_to_const ( len) {
539
538
Some ( Constant :: Int ( len) ) => alloc
@@ -547,7 +546,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
547
546
} )
548
547
. collect :: < Option < Vec < Constant > > > ( )
549
548
. map ( Constant :: Vec ) ,
550
- Some ( _ ) | None => None ,
549
+ _ => None ,
551
550
} ,
552
551
// FIXME: implement other array type conversions.
553
552
_ => None ,
0 commit comments