@@ -2071,22 +2071,17 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
20712071 ) = rvalue
20722072 {
20732073 for operand in operands {
2074- let assigned_from = match operand {
2075- Operand :: Copy ( assigned_from) | Operand :: Move ( assigned_from) => {
2076- assigned_from
2077- }
2078- _ => continue ,
2074+ let ( Operand :: Copy ( assigned_from) | Operand :: Move ( assigned_from) ) = operand else {
2075+ continue ;
20792076 } ;
20802077 debug ! (
20812078 "annotate_argument_and_return_for_borrow: assigned_from={:?}" ,
20822079 assigned_from
20832080 ) ;
20842081
20852082 // Find the local from the operand.
2086- let assigned_from_local = match assigned_from. local_or_deref_local ( )
2087- {
2088- Some ( local) => local,
2089- None => continue ,
2083+ let Some ( assigned_from_local) = assigned_from. local_or_deref_local ( ) else {
2084+ continue ;
20902085 } ;
20912086
20922087 if assigned_from_local != target {
@@ -2138,10 +2133,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
21382133 ) ;
21392134
21402135 // Find the local from the rvalue.
2141- let assigned_from_local = match assigned_from. local_or_deref_local ( ) {
2142- Some ( local) => local,
2143- None => continue ,
2144- } ;
2136+ let Some ( assigned_from_local) = assigned_from. local_or_deref_local ( ) else { continue } ;
21452137 debug ! (
21462138 "annotate_argument_and_return_for_borrow: \
21472139 assigned_from_local={:?}",
@@ -2189,11 +2181,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
21892181 assigned_to, args
21902182 ) ;
21912183 for operand in args {
2192- let assigned_from = match operand {
2193- Operand :: Copy ( assigned_from) | Operand :: Move ( assigned_from) => {
2194- assigned_from
2195- }
2196- _ => continue ,
2184+ let ( Operand :: Copy ( assigned_from) | Operand :: Move ( assigned_from) ) = operand else {
2185+ continue ;
21972186 } ;
21982187 debug ! (
21992188 "annotate_argument_and_return_for_borrow: assigned_from={:?}" ,
0 commit comments