@@ -349,7 +349,7 @@ impl BlockEq {
349
349
350
350
/// If the statement is a local, checks if the bound names match the expected list of names.
351
351
fn eq_binding_names ( s : & Stmt < ' _ > , names : & [ ( HirId , Symbol ) ] ) -> bool {
352
- if let StmtKind :: Local ( l) = s. kind {
352
+ if let StmtKind :: Let ( l) = s. kind {
353
353
let mut i = 0usize ;
354
354
let mut res = true ;
355
355
l. pat . each_binding_or_first ( & mut |_, _, _, name| {
@@ -389,7 +389,7 @@ fn eq_stmts(
389
389
eq : & mut HirEqInterExpr < ' _ , ' _ , ' _ > ,
390
390
moved_bindings : & mut Vec < ( HirId , Symbol ) > ,
391
391
) -> bool {
392
- ( if let StmtKind :: Local ( l) = stmt. kind {
392
+ ( if let StmtKind :: Let ( l) = stmt. kind {
393
393
let old_count = moved_bindings. len ( ) ;
394
394
l. pat . each_binding_or_first ( & mut |_, id, _, name| {
395
395
moved_bindings. push ( ( id, name. name ) ) ;
@@ -432,7 +432,7 @@ fn scan_block_for_eq<'tcx>(
432
432
. iter ( )
433
433
. enumerate ( )
434
434
. find ( |& ( i, stmt) | {
435
- if let StmtKind :: Local ( l) = stmt. kind
435
+ if let StmtKind :: Let ( l) = stmt. kind
436
436
&& needs_ordered_drop ( cx, cx. typeck_results ( ) . node_type ( l. hir_id ) )
437
437
{
438
438
local_needs_ordered_drop = true ;
@@ -509,7 +509,7 @@ fn scan_block_for_eq<'tcx>(
509
509
// Clear out all locals seen at the end so far. None of them can be moved.
510
510
let stmts = & blocks[ 0 ] . stmts ;
511
511
for stmt in & stmts[ stmts. len ( ) - init..=stmts. len ( ) - offset] {
512
- if let StmtKind :: Local ( l) = stmt. kind {
512
+ if let StmtKind :: Let ( l) = stmt. kind {
513
513
l. pat . each_binding_or_first ( & mut |_, id, _, _| {
514
514
// FIXME(rust/#120456) - is `swap_remove` correct?
515
515
eq. locals . swap_remove ( & id) ;
0 commit comments