about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authornils <48135649+Nilstrieb@users.noreply.github.com>2022-10-18 16:55:32 +0200
committernils <48135649+Nilstrieb@users.noreply.github.com>2022-10-19 16:21:21 +0200
commitccc54613c33208520ae030090a90d59c310c5624 (patch)
tree16541130a517340e72f92835257328c77b5394a1 /compiler/rustc_codegen_ssa/src
parentd7dd01fe8b071602510eaac9f676acc0e3cf8e4a (diff)
Get rid of native_library projection queries
They don't seem particularly useful as I don't expect
native libraries to change frequently.
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 8d7e2c5cf39..13777507d71 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<
             // let it through if it's included statically.
             match tcx.hir().get_by_def_id(def_id) {
                 Node::ForeignItem(..) => {
-                    tcx.is_statically_included_foreign_item(def_id).then_some(def_id)
+                    tcx.native_library(def_id).map_or(false, |library| library.kind.is_statically_included()).then_some(def_id)
                 }
 
                 // Only consider nodes that actually have exported symbols.