@@ -1085,7 +1085,7 @@ pub fn is_useful<'p, 'a: 'p, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
10851085 if let Some ( constructors) = pat_constructors ( cx, v[ 0 ] , pcx) {
10861086 debug ! ( "is_useful - expanding constructors: {:#?}" , constructors) ;
10871087 split_grouped_constructors ( cx. tcx , constructors, matrix, pcx. ty ) . into_iter ( ) . map ( |c|
1088- is_useful_specialized ( cx, matrix, v, c. clone ( ) , pcx. ty , witness)
1088+ is_useful_specialized ( cx, matrix, v, c, pcx. ty , witness)
10891089 ) . find ( |result| result. is_useful ( ) ) . unwrap_or ( NotUseful )
10901090 } else {
10911091 debug ! ( "is_useful - expanding wildcard" ) ;
@@ -1136,7 +1136,7 @@ pub fn is_useful<'p, 'a: 'p, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
11361136
11371137 if cheap_missing_ctors == MissingCtors :: Empty && !is_non_exhaustive {
11381138 split_grouped_constructors ( cx. tcx , all_ctors, matrix, pcx. ty ) . into_iter ( ) . map ( |c| {
1139- is_useful_specialized ( cx, matrix, v, c. clone ( ) , pcx. ty , witness)
1139+ is_useful_specialized ( cx, matrix, v, c, pcx. ty , witness)
11401140 } ) . find ( |result| result. is_useful ( ) ) . unwrap_or ( NotUseful )
11411141 } else {
11421142 let matrix = rows. iter ( ) . filter_map ( |r| {
0 commit comments