]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_ssa/back/symbol_export.rs
Rollup merge of #68071 - estebank:ice-67995, r=Centril
[rust.git] / src / librustc_codegen_ssa / back / symbol_export.rs
index 07ff5c362ebbf105f846acb6e4cc838a301cb356..a406b5f103b9d2f85f73109b6bb4cb33e7625699 100644 (file)
@@ -1,18 +1,18 @@
 use std::collections::hash_map::Entry::*;
 use std::sync::Arc;
 
-use rustc::hir;
-use rustc::hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
-use rustc::hir::CodegenFnAttrFlags;
-use rustc::hir::Node;
+use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags;
 use rustc::middle::exported_symbols::{metadata_symbol_name, ExportedSymbol, SymbolExportLevel};
 use rustc::session::config;
 use rustc::ty::query::Providers;
 use rustc::ty::subst::SubstsRef;
 use rustc::ty::Instance;
 use rustc::ty::{SymbolName, TyCtxt};
-use rustc::util::nodemap::{DefIdMap, FxHashMap};
 use rustc_data_structures::fingerprint::Fingerprint;
+use rustc_data_structures::fx::FxHashMap;
+use rustc_hir as hir;
+use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, CRATE_DEF_INDEX, LOCAL_CRATE};
+use rustc_hir::Node;
 use rustc_index::vec::IndexVec;
 use syntax::expand::allocator::ALLOCATOR_METHODS;
 
@@ -65,7 +65,6 @@ fn reachable_non_generics_provider(
 
     let mut reachable_non_generics: DefIdMap<_> = tcx
         .reachable_set(LOCAL_CRATE)
-        .0
         .iter()
         .filter_map(|&hir_id| {
             // We want to ignore some FFI functions that are not exposed from
@@ -313,7 +312,7 @@ fn upstream_monomorphizations_for_provider(
 
 fn is_unreachable_local_definition_provider(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
     if let Some(hir_id) = tcx.hir().as_local_hir_id(def_id) {
-        !tcx.reachable_set(LOCAL_CRATE).0.contains(&hir_id)
+        !tcx.reachable_set(LOCAL_CRATE).contains(&hir_id)
     } else {
         bug!("is_unreachable_local_definition called with non-local DefId: {:?}", def_id)
     }
@@ -346,7 +345,7 @@ fn symbol_export_level(tcx: TyCtxt<'_>, sym_def_id: DefId) -> SymbolExportLevel
     if is_extern && !std_internal {
         let target = &tcx.sess.target.target.llvm_target;
         // WebAssembly cannot export data symbols, so reduce their export level
-        if target.contains("wasm32") || target.contains("emscripten") {
+        if target.contains("emscripten") {
             if let Some(Node::Item(&hir::Item { kind: hir::ItemKind::Static(..), .. })) =
                 tcx.hir().get_if_local(sym_def_id)
             {