@@ -1048,7 +1048,7 @@ pub fn is_useful<'p, 'a: 'p, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
1048
1048
if let Some ( constructors) = pat_constructors ( cx, v[ 0 ] , pcx) {
1049
1049
debug ! ( "is_useful - expanding constructors: {:#?}" , constructors) ;
1050
1050
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)
1052
1052
) . find ( |result| result. is_useful ( ) ) . unwrap_or ( NotUseful )
1053
1053
} else {
1054
1054
debug ! ( "is_useful - expanding wildcard" ) ;
@@ -1096,7 +1096,7 @@ pub fn is_useful<'p, 'a: 'p, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
1096
1096
1097
1097
if missing_ctors. is_empty ( ) && !is_non_exhaustive {
1098
1098
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)
1100
1100
} ) . find ( |result| result. is_useful ( ) ) . unwrap_or ( NotUseful )
1101
1101
} else {
1102
1102
let matrix = rows. iter ( ) . filter_map ( |r| {
0 commit comments