@@ -318,7 +318,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
318318 ) ;
319319 expr_id = parent_id;
320320 }
321- Node :: Local ( local) => {
321+ Node :: LetStmt ( local) => {
322322 if let Some ( mut ty) = local. ty {
323323 while let Some ( index) = tuple_indexes. pop ( ) {
324324 match ty. kind {
@@ -1331,7 +1331,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
13311331 // ++++++++++
13321332 // since the user probably just misunderstood how `let else`
13331333 // and `&&` work together.
1334- if let Some ( ( _, hir:: Node :: Local ( local) ) ) = cond_parent
1334+ if let Some ( ( _, hir:: Node :: LetStmt ( local) ) ) = cond_parent
13351335 && let hir:: PatKind :: Path ( qpath) | hir:: PatKind :: TupleStruct ( qpath, _, _) =
13361336 & local. pat . kind
13371337 && let hir:: QPath :: Resolved ( None , path) = qpath
@@ -1731,7 +1731,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
17311731
17321732 match self . tcx . parent_hir_node ( * hir_id) {
17331733 // foo.clone()
1734- hir:: Node :: Local ( hir:: LetStmt { init : Some ( init) , .. } ) => {
1734+ hir:: Node :: LetStmt ( hir:: LetStmt { init : Some ( init) , .. } ) => {
17351735 self . note_type_is_not_clone_inner_expr ( init)
17361736 }
17371737 // When `expr` is more complex like a tuple
@@ -1740,7 +1740,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
17401740 kind : hir:: PatKind :: Tuple ( pats, ..) ,
17411741 ..
17421742 } ) => {
1743- let hir:: Node :: Local ( hir:: LetStmt { init : Some ( init) , .. } ) =
1743+ let hir:: Node :: LetStmt ( hir:: LetStmt { init : Some ( init) , .. } ) =
17441744 self . tcx . parent_hir_node ( * pat_hir_id)
17451745 else {
17461746 return expr;
@@ -1774,7 +1774,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
17741774 && let hir:: Path { segments : [ _] , res : crate :: Res :: Local ( binding) , .. } =
17751775 call_expr_path
17761776 && let hir:: Node :: Pat ( hir:: Pat { hir_id, .. } ) = self . tcx . hir_node ( * binding)
1777- && let hir:: Node :: Local ( hir:: LetStmt { init : Some ( init) , .. } ) =
1777+ && let hir:: Node :: LetStmt ( hir:: LetStmt { init : Some ( init) , .. } ) =
17781778 self . tcx . parent_hir_node ( * hir_id)
17791779 && let Expr {
17801780 kind : hir:: ExprKind :: Closure ( hir:: Closure { body : body_id, .. } ) ,
@@ -3134,7 +3134,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
31343134 let hir:: Node :: Pat ( pat) = self . tcx . hir_node ( hir_id) else {
31353135 return ;
31363136 } ;
3137- let hir:: Node :: Local ( hir:: LetStmt { ty : None , init : Some ( init) , .. } ) =
3137+ let hir:: Node :: LetStmt ( hir:: LetStmt { ty : None , init : Some ( init) , .. } ) =
31383138 self . tcx . parent_hir_node ( pat. hir_id )
31393139 else {
31403140 return ;
0 commit comments