Revert "Merge CrateDisambiguator into StableCrateId"

This reverts commit d0ec85d3fb.
This commit is contained in:
bjorn3
2021-06-01 16:32:13 +02:00
parent 6c5b6985fd
commit 8176ab8bc1
30 changed files with 207 additions and 127 deletions

View File

@@ -592,8 +592,8 @@ impl Printer<'tcx> for SymbolMangler<'tcx> {
fn path_crate(mut self, cnum: CrateNum) -> Result<Self::Path, Self::Error> {
self.push("C");
let stable_crate_id = self.tcx.def_path_hash(cnum.as_def_id()).stable_crate_id();
self.push_disambiguator(stable_crate_id.to_u64());
let fingerprint = self.tcx.crate_disambiguator(cnum).to_fingerprint();
self.push_disambiguator(fingerprint.to_smaller_hash());
let name = self.tcx.crate_name(cnum).as_str();
self.push_ident(&name);
Ok(self)