@@ -2071,22 +2071,17 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
2071
2071
) = rvalue
2072
2072
{
2073
2073
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 ;
2079
2076
} ;
2080
2077
debug ! (
2081
2078
"annotate_argument_and_return_for_borrow: assigned_from={:?}" ,
2082
2079
assigned_from
2083
2080
) ;
2084
2081
2085
2082
// 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 ;
2090
2085
} ;
2091
2086
2092
2087
if assigned_from_local != target {
@@ -2138,10 +2133,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
2138
2133
) ;
2139
2134
2140
2135
// 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 } ;
2145
2137
debug ! (
2146
2138
"annotate_argument_and_return_for_borrow: \
2147
2139
assigned_from_local={:?}",
@@ -2189,11 +2181,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
2189
2181
assigned_to, args
2190
2182
) ;
2191
2183
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 ;
2197
2186
} ;
2198
2187
debug ! (
2199
2188
"annotate_argument_and_return_for_borrow: assigned_from={:?}" ,
0 commit comments