about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-01-15 23:10:14 +0000
committerbors <bors@rust-lang.org>2022-01-15 23:10:14 +0000
commitf9d61cd2eda81b595862635914bd0224402a4a26 (patch)
tree1e2d540d7fb5b23e6567d2c766b4b1f5dfbef30e /compiler/rustc_codegen_ssa/src
parentec4bcaac450279b029f3480b8b8f1b82ab36a5eb (diff)
parent8617ff0f0bfc8ab8484f4ad970d63e0a787f954f (diff)
downloadrust-f9d61cd2eda81b595862635914bd0224402a4a26.tar.gz
rust-f9d61cd2eda81b595862635914bd0224402a4a26.zip
Auto merge of #90146 - cjgillot:no-id-map, r=nagisa
Reduce use of LocalDefId <-> HirId maps

This is an attempt to reduce the perf effect of https://github.com/rust-lang/rust/pull/89278.
r? `@ghost`
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/symbol_export.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs
index baafa74b131..aeddd926896 100644
--- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs
+++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs
@@ -76,7 +76,7 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, cnum: CrateNum) -> DefIdMap<
             //
             // As a result, if this id is an FFI item (foreign item) then we only
             // let it through if it's included statically.
-            match tcx.hir().get(tcx.hir().local_def_id_to_hir_id(def_id)) {
+            match tcx.hir().get_by_def_id(def_id) {
                 Node::ForeignItem(..) => {
                     tcx.is_statically_included_foreign_item(def_id).then_some(def_id)
                 }