@@ -1437,7 +1437,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
14371437        let  Some ( hir_generics)  = tcx
14381438            . typeck_root_def_id ( self . mir_def_id ( ) . to_def_id ( ) ) 
14391439            . as_local ( ) 
1440-             . and_then ( |def_id| tcx. hir ( ) . get_generics ( def_id) ) 
1440+             . and_then ( |def_id| tcx. hir_get_generics ( def_id) ) 
14411441        else  { 
14421442            return ; 
14431443        } ; 
@@ -1889,7 +1889,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
18891889
18901890    fn  suggest_copy_for_type_in_cloned_ref ( & self ,  err :  & mut  Diag < ' infcx > ,  place :  Place < ' tcx > )  { 
18911891        let  tcx = self . infcx . tcx ; 
1892-         let  hir = tcx. hir ( ) ; 
18931892        let  Some ( body_id)  = tcx. hir_node ( self . mir_hir_id ( ) ) . body_id ( )  else  {  return  } ; 
18941893
18951894        struct  FindUselessClone < ' tcx >  { 
@@ -1917,7 +1916,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
19171916
19181917        let  mut  expr_finder = FindUselessClone :: new ( tcx,  self . mir_def_id ( ) ) ; 
19191918
1920-         let  body = hir . body ( body_id) . value ; 
1919+         let  body = tcx . hir_body ( body_id) . value ; 
19211920        expr_finder. visit_expr ( body) ; 
19221921
19231922        struct  Holds < ' tcx >  { 
@@ -2106,7 +2105,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
21062105        let  tcx = self . infcx . tcx ; 
21072106        let  body_id = tcx. hir_node ( self . mir_hir_id ( ) ) . body_id ( ) ?; 
21082107        let  mut  expr_finder = FindExprBySpan :: new ( span,  tcx) ; 
2109-         expr_finder. visit_expr ( tcx. hir ( ) . body ( body_id) . value ) ; 
2108+         expr_finder. visit_expr ( tcx. hir_body ( body_id) . value ) ; 
21102109        expr_finder. result 
21112110    } 
21122111
@@ -2258,7 +2257,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
22582257    )  { 
22592258        let  issue_span = issued_spans. args_or_use ( ) ; 
22602259        let  tcx = self . infcx . tcx ; 
2261-         let  hir = tcx. hir ( ) ; 
22622260
22632261        let  Some ( body_id)  = tcx. hir_node ( self . mir_hir_id ( ) ) . body_id ( )  else  {  return  } ; 
22642262        let  typeck_results = tcx. typeck ( self . mir_def_id ( ) ) ; 
@@ -2346,7 +2344,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
23462344            pat_span :  None , 
23472345            head :  None , 
23482346        } ; 
2349-         finder. visit_expr ( hir . body ( body_id) . value ) ; 
2347+         finder. visit_expr ( tcx . hir_body ( body_id) . value ) ; 
23502348
23512349        if  let  Some ( body_expr)  = finder. body_expr 
23522350            && let  Some ( loop_span)  = finder. loop_span 
@@ -2454,7 +2452,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
24542452        // Get the body the error happens in 
24552453        let  Some ( body_id)  = tcx. hir_node ( self . mir_hir_id ( ) ) . body_id ( )  else  {  return  } ; 
24562454
2457-         let  body_expr = hir . body ( body_id) . value ; 
2455+         let  body_expr = tcx . hir_body ( body_id) . value ; 
24582456
24592457        struct  ClosureFinder < ' hir >  { 
24602458            hir :  rustc_middle:: hir:: map:: Map < ' hir > , 
@@ -2558,7 +2556,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
25582556            } 
25592557
25602558            let  mut  finder = VariableUseFinder  {  local_id,  spans :  Vec :: new ( )  } ; 
2561-             finder. visit_expr ( hir . body ( closure. body ) . value ) ; 
2559+             finder. visit_expr ( tcx . hir_body ( closure. body ) . value ) ; 
25622560
25632561            spans = finder. spans ; 
25642562        }  else  { 
@@ -3211,7 +3209,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
32113209                if  let  Some ( scope)  = self . body . source_scopes . get ( source_info. scope ) 
32123210                    && let  ClearCrossCrate :: Set ( scope_data)  = & scope. local_data 
32133211                    && let  Some ( id)  = self . infcx . tcx . hir_node ( scope_data. lint_root ) . body_id ( ) 
3214-                     && let  hir:: ExprKind :: Block ( block,  _)  = self . infcx . tcx . hir ( ) . body ( id) . value . kind 
3212+                     && let  hir:: ExprKind :: Block ( block,  _)  = self . infcx . tcx . hir_body ( id) . value . kind 
32153213                { 
32163214                    for  stmt in  block. stmts  { 
32173215                        let  mut  visitor = NestedStatementVisitor  { 
0 commit comments