@@ -262,15 +262,12 @@ fn find_place_aliases<'tcx>(
262
262
for stmt in body. basic_blocks [ cur_block] . statements . iter ( ) . rev ( ) {
263
263
match & stmt. kind {
264
264
// if the statement assigns to `inst_arg`, update `inst_arg` to the rhs
265
- StatementKind :: Assign ( box ( assign_place, rvalue) )
266
- if assign_place. local_or_deref_local ( ) == id_arg. local_or_deref_local ( ) =>
267
- {
268
- if let Rvalue :: Use ( Operand :: Copy ( pl) | Operand :: Move ( pl) )
269
- | Rvalue :: Ref ( _, _, pl) = rvalue
270
- {
271
- id_arg = pl;
272
- likely_program_id_aliases. push ( * pl) ;
273
- }
265
+ StatementKind :: Assign ( box (
266
+ assign_place,
267
+ Rvalue :: Use ( Operand :: Copy ( pl) | Operand :: Move ( pl) ) | Rvalue :: Ref ( _, _, pl) ,
268
+ ) ) if assign_place. local_or_deref_local ( ) == id_arg. local_or_deref_local ( ) => {
269
+ id_arg = pl;
270
+ likely_program_id_aliases. push ( * pl) ;
274
271
}
275
272
_ => { }
276
273
}
@@ -356,21 +353,18 @@ fn is_moved_from<'tcx>(
356
353
loop {
357
354
for stmt in body. basic_blocks [ cur_block] . statements . iter ( ) . rev ( ) {
358
355
match & stmt. kind {
359
- StatementKind :: Assign ( box ( assign_place, rvalue) )
360
- if assign_place. local_or_deref_local ( )
361
- == search_place. local_or_deref_local ( ) =>
356
+ StatementKind :: Assign ( box (
357
+ assign_place,
358
+ Rvalue :: Use ( Operand :: Copy ( rvalue_place) | Operand :: Move ( rvalue_place) )
359
+ | Rvalue :: Ref ( _, _, rvalue_place) ,
360
+ ) ) if assign_place. local_or_deref_local ( )
361
+ == search_place. local_or_deref_local ( ) =>
362
362
{
363
- match rvalue {
364
- Rvalue :: Use ( Operand :: Copy ( rvalue_place) | Operand :: Move ( rvalue_place) )
365
- | Rvalue :: Ref ( _, _, rvalue_place) => {
366
- search_place = rvalue_place;
367
- if let Some ( search_loc) = search_place. local_or_deref_local ( ) {
368
- if search_list. contains ( & search_loc) {
369
- return true ;
370
- }
371
- }
363
+ search_place = rvalue_place;
364
+ if let Some ( search_loc) = search_place. local_or_deref_local ( ) {
365
+ if search_list. contains ( & search_loc) {
366
+ return true ;
372
367
}
373
- _ => { }
374
368
}
375
369
}
376
370
_ => { }
0 commit comments