@@ -349,7 +349,7 @@ impl BlockEq {
349349
350350/// If the statement is a local, checks if the bound names match the expected list of names.
351351fn 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 {
353353 let mut i = 0usize ;
354354 let mut res = true ;
355355 l. pat . each_binding_or_first ( & mut |_, _, _, name| {
@@ -389,7 +389,7 @@ fn eq_stmts(
389389 eq : & mut HirEqInterExpr < ' _ , ' _ , ' _ > ,
390390 moved_bindings : & mut Vec < ( HirId , Symbol ) > ,
391391) -> bool {
392- ( if let StmtKind :: Local ( l) = stmt. kind {
392+ ( if let StmtKind :: Let ( l) = stmt. kind {
393393 let old_count = moved_bindings. len ( ) ;
394394 l. pat . each_binding_or_first ( & mut |_, id, _, name| {
395395 moved_bindings. push ( ( id, name. name ) ) ;
@@ -432,7 +432,7 @@ fn scan_block_for_eq<'tcx>(
432432 . iter ( )
433433 . enumerate ( )
434434 . find ( |& ( i, stmt) | {
435- if let StmtKind :: Local ( l) = stmt. kind
435+ if let StmtKind :: Let ( l) = stmt. kind
436436 && needs_ordered_drop ( cx, cx. typeck_results ( ) . node_type ( l. hir_id ) )
437437 {
438438 local_needs_ordered_drop = true ;
@@ -509,7 +509,7 @@ fn scan_block_for_eq<'tcx>(
509509 // Clear out all locals seen at the end so far. None of them can be moved.
510510 let stmts = & blocks[ 0 ] . stmts ;
511511 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 {
513513 l. pat . each_binding_or_first ( & mut |_, id, _, _| {
514514 // FIXME(rust/#120456) - is `swap_remove` correct?
515515 eq. locals . swap_remove ( & id) ;
0 commit comments