@@ -1048,7 +1048,7 @@ pub fn is_useful<'p, 'a: 'p, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
10481048 if let Some ( constructors) = pat_constructors ( cx, v[ 0 ] , pcx) {
10491049 debug ! ( "is_useful - expanding constructors: {:#?}" , constructors) ;
10501050 split_grouped_constructors ( cx. tcx , constructors, matrix, pcx. ty ) . into_iter ( ) . map ( |c|
1051- is_useful_specialized ( cx, matrix, v, c. clone ( ) , pcx. ty , witness)
1051+ is_useful_specialized ( cx, matrix, v, c, pcx. ty , witness)
10521052 ) . find ( |result| result. is_useful ( ) ) . unwrap_or ( NotUseful )
10531053 } else {
10541054 debug ! ( "is_useful - expanding wildcard" ) ;
@@ -1096,7 +1096,7 @@ pub fn is_useful<'p, 'a: 'p, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
10961096
10971097 if missing_ctors. is_empty ( ) && !is_non_exhaustive {
10981098 split_grouped_constructors ( cx. tcx , all_ctors, matrix, pcx. ty ) . into_iter ( ) . map ( |c| {
1099- is_useful_specialized ( cx, matrix, v, c. clone ( ) , pcx. ty , witness)
1099+ is_useful_specialized ( cx, matrix, v, c, pcx. ty , witness)
11001100 } ) . find ( |result| result. is_useful ( ) ) . unwrap_or ( NotUseful )
11011101 } else {
11021102 let matrix = rows. iter ( ) . filter_map ( |r| {
0 commit comments