@@ -139,6 +139,7 @@ impl Constant {
139139 . find ( |r| r. map_or ( true , |o| o != Ordering :: Equal ) )
140140 . unwrap_or_else ( || Some ( l. len ( ) . cmp ( & r. len ( ) ) ) ) ,
141141 ( & Self :: Repeat ( ref lv, ref ls) , & Self :: Repeat ( ref rv, ref rs) ) => {
142+ #[ allow( clippy:: match_wildcard_for_single_variants) ]
142143 match Self :: partial_cmp ( tcx, cmp_type, lv, rv) {
143144 Some ( Equal ) => Some ( ls. cmp ( rs) ) ,
144145 x => x,
@@ -354,14 +355,14 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
354355 ( Some ( Constant :: Vec ( vec) ) , Some ( Constant :: Int ( index) ) ) => match vec. get ( index as usize ) {
355356 Some ( Constant :: F32 ( x) ) => Some ( Constant :: F32 ( * x) ) ,
356357 Some ( Constant :: F64 ( x) ) => Some ( Constant :: F64 ( * x) ) ,
357- _ => None ,
358+ Some ( _ ) | None => None ,
358359 } ,
359360 ( Some ( Constant :: Vec ( vec) ) , _) => {
360361 if !vec. is_empty ( ) && vec. iter ( ) . all ( |x| * x == vec[ 0 ] ) {
361362 match vec. get ( 0 ) {
362363 Some ( Constant :: F32 ( x) ) => Some ( Constant :: F32 ( * x) ) ,
363364 Some ( Constant :: F64 ( x) ) => Some ( Constant :: F64 ( * x) ) ,
364- _ => None ,
365+ Some ( _ ) | None => None ,
365366 }
366367 } else {
367368 None
@@ -532,7 +533,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
532533 } )
533534 . collect :: < Option < Vec < Constant > > > ( )
534535 . map ( Constant :: Vec ) ,
535- _ => None ,
536+ Some ( _ ) | None => None ,
536537 } ,
537538 ty:: Float ( FloatTy :: F64 ) => match miri_to_const ( len) {
538539 Some ( Constant :: Int ( len) ) => alloc
@@ -546,7 +547,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
546547 } )
547548 . collect :: < Option < Vec < Constant > > > ( )
548549 . map ( Constant :: Vec ) ,
549- _ => None ,
550+ Some ( _ ) | None => None ,
550551 } ,
551552 // FIXME: implement other array type conversions.
552553 _ => None ,
0 commit comments