diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-11-24 19:28:19 +0300 | 
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-11-26 12:41:21 +0300 | 
| commit | c697927f443043fb9715b9b239fa1d2440c0e53c (patch) | |
| tree | bf4639a340a229b2940d78a6ffd226c4a4f1ff1a /compiler/rustc_mir_build/src/build/mod.rs | |
| parent | 9529a5d2655f6974c2ee16e91c5db548a3daea03 (diff) | |
| download | rust-c697927f443043fb9715b9b239fa1d2440c0e53c.tar.gz rust-c697927f443043fb9715b9b239fa1d2440c0e53c.zip | |
rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` cleanup
Diffstat (limited to 'compiler/rustc_mir_build/src/build/mod.rs')
| -rw-r--r-- | compiler/rustc_mir_build/src/build/mod.rs | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/compiler/rustc_mir_build/src/build/mod.rs b/compiler/rustc_mir_build/src/build/mod.rs index 3d2396f33fc..ad06db91e37 100644 --- a/compiler/rustc_mir_build/src/build/mod.rs +++ b/compiler/rustc_mir_build/src/build/mod.rs @@ -451,7 +451,7 @@ fn construct_fn<'tcx>( fn_sig: ty::FnSig<'tcx>, ) -> Body<'tcx> { let span = tcx.def_span(fn_def); - let fn_id = tcx.hir().local_def_id_to_hir_id(fn_def); + let fn_id = tcx.local_def_id_to_hir_id(fn_def); let coroutine_kind = tcx.coroutine_kind(fn_def); // The representation of thir for `-Zunpretty=thir-tree` relies on @@ -569,7 +569,7 @@ fn construct_const<'a, 'tcx>( expr: ExprId, const_ty: Ty<'tcx>, ) -> Body<'tcx> { - let hir_id = tcx.hir().local_def_id_to_hir_id(def); + let hir_id = tcx.local_def_id_to_hir_id(def); // Figure out what primary body this item has. let (span, const_ty_span) = match tcx.hir().get(hir_id) { @@ -622,7 +622,7 @@ fn construct_const<'a, 'tcx>( /// with type errors, but normal MIR construction can't handle that in general. fn construct_error(tcx: TyCtxt<'_>, def_id: LocalDefId, guar: ErrorGuaranteed) -> Body<'_> { let span = tcx.def_span(def_id); - let hir_id = tcx.hir().local_def_id_to_hir_id(def_id); + let hir_id = tcx.local_def_id_to_hir_id(def_id); let coroutine_kind = tcx.coroutine_kind(def_id); let (inputs, output, yield_ty) = match tcx.def_kind(def_id) { | 
