Revert "Revert "Merge CrateDisambiguator into StableCrateId""
This reverts commit 8176ab8bc1
.
This commit is contained in:
parent
9a27044f42
commit
489ad8b8b5
28 changed files with 116 additions and 193 deletions
|
@ -14,7 +14,6 @@ use rustc_data_structures::fx::FxHashMap;
|
|||
use rustc_data_structures::stable_hasher::StableHasher;
|
||||
use rustc_data_structures::unhash::UnhashMap;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_span::crate_disambiguator::CrateDisambiguator;
|
||||
use rustc_span::hygiene::ExpnId;
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
|
||||
|
@ -330,7 +329,7 @@ impl Definitions {
|
|||
}
|
||||
|
||||
/// Adds a root definition (no parent) and a few other reserved definitions.
|
||||
pub fn new(crate_name: &str, crate_disambiguator: CrateDisambiguator) -> Definitions {
|
||||
pub fn new(stable_crate_id: StableCrateId) -> Definitions {
|
||||
let key = DefKey {
|
||||
parent: None,
|
||||
disambiguated_data: DisambiguatedDefPathData {
|
||||
|
@ -339,7 +338,6 @@ impl Definitions {
|
|||
},
|
||||
};
|
||||
|
||||
let stable_crate_id = StableCrateId::new(crate_name, crate_disambiguator);
|
||||
let parent_hash = DefPathHash::new(stable_crate_id, 0);
|
||||
let def_path_hash = key.compute_stable_hash(parent_hash);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue