diff options
| author | bors <bors@rust-lang.org> | 2022-04-19 13:10:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-19 13:10:12 +0000 |
| commit | 4ca19e09d302a4cbde14f9cb1bc109179dc824cd (patch) | |
| tree | b779b25871b429dfaafe1c4de5cc5051333c3689 /compiler/rustc_codegen_ssa/src | |
| parent | c102c5cfc60203c82460bdde2eecd19ccd8c125b (diff) | |
| parent | 9fad214593e87f151b8f09ff0cda9cd52372d037 (diff) | |
| download | rust-4ca19e09d302a4cbde14f9cb1bc109179dc824cd.tar.gz rust-4ca19e09d302a4cbde14f9cb1bc109179dc824cd.zip | |
Auto merge of #96214 - Dylan-DPC:rollup-a5b4fow, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #94493 (Improved diagnostic on failure to meet send bound on future in a foreign crate) - #95809 (Fix typo in bootstrap.py) - #96086 (Remove `--extern-location` and all associated code) - #96089 (`alloc`: make `vec!` unavailable under `no_global_oom_handling`) - #96122 (Fix an invalid error for a suggestion to add a slice in pattern-matching) - #96142 (Stop using CRATE_DEF_INDEX outside of metadata encoding.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/symbol_export.rs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs index 765bd877db1..7b7c676c26c 100644 --- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs +++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs @@ -1,12 +1,10 @@ use std::collections::hash_map::Entry::*; use rustc_ast::expand::allocator::ALLOCATOR_METHODS; -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, LocalDefId, CRATE_DEF_INDEX, LOCAL_CRATE}; +use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, LocalDefId, LOCAL_CRATE}; use rustc_hir::Node; -use rustc_index::vec::IndexVec; use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags; use rustc_middle::middle::exported_symbols::{ metadata_symbol_name, ExportedSymbol, SymbolExportLevel, @@ -277,17 +275,6 @@ fn upstream_monomorphizations_provider( let mut instances: DefIdMap<FxHashMap<_, _>> = Default::default(); - let cnum_stable_ids: IndexVec<CrateNum, Fingerprint> = { - let mut cnum_stable_ids = IndexVec::from_elem_n(Fingerprint::ZERO, cnums.len() + 1); - - for &cnum in cnums.iter() { - cnum_stable_ids[cnum] = - tcx.def_path_hash(DefId { krate: cnum, index: CRATE_DEF_INDEX }).0; - } - - cnum_stable_ids - }; - let drop_in_place_fn_def_id = tcx.lang_items().drop_in_place_fn(); for &cnum in cnums.iter() { @@ -316,7 +303,7 @@ fn upstream_monomorphizations_provider( // If there are multiple monomorphizations available, // we select one deterministically. let other_cnum = *e.get(); - if cnum_stable_ids[other_cnum] > cnum_stable_ids[cnum] { + if tcx.stable_crate_id(other_cnum) > tcx.stable_crate_id(cnum) { e.insert(cnum); } } |
