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_const_eval/src | |
| 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_const_eval/src')
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/eval_context.rs b/compiler/rustc_const_eval/src/interpret/eval_context.rs index 07cab5e3400..3bdfc1db913 100644 --- a/compiler/rustc_const_eval/src/interpret/eval_context.rs +++ b/compiler/rustc_const_eval/src/interpret/eval_context.rs @@ -456,7 +456,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { self.stack() .iter() .find_map(|frame| frame.body.source.def_id().as_local()) - .map_or(CRATE_HIR_ID, |def_id| self.tcx.hir().local_def_id_to_hir_id(def_id)) + .map_or(CRATE_HIR_ID, |def_id| self.tcx.local_def_id_to_hir_id(def_id)) } /// Turn the given error into a human-readable string. Expects the string to be printed, so if diff --git a/compiler/rustc_const_eval/src/transform/check_consts/mod.rs b/compiler/rustc_const_eval/src/transform/check_consts/mod.rs index 095e119d38c..4c2492d1867 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/mod.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/mod.rs @@ -82,7 +82,7 @@ pub fn rustc_allow_const_fn_unstable( def_id: LocalDefId, feature_gate: Symbol, ) -> bool { - let attrs = tcx.hir().attrs(tcx.hir().local_def_id_to_hir_id(def_id)); + let attrs = tcx.hir().attrs(tcx.local_def_id_to_hir_id(def_id)); attr::rustc_allow_const_fn_unstable(tcx.sess, attrs).any(|name| name == feature_gate) } diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs index ca63eb135bd..5bf9911269c 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs @@ -119,7 +119,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> { match self_ty.kind() { Param(param_ty) => { debug!(?param_ty); - let caller_hir_id = tcx.hir().local_def_id_to_hir_id(caller); + let caller_hir_id = tcx.local_def_id_to_hir_id(caller); if let Some(generics) = tcx.hir().get(caller_hir_id).generics() { let constraint = with_no_trimmed_paths!(format!( "~const {}", |
