diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-06-08 18:36:30 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-07-06 11:28:04 +0200 |
| commit | 489ad8b8b511df0d19fa3ef825240d020d240d3e (patch) | |
| tree | fe8d56c85f714832fecdd2ace168bcb82d9edbc7 /compiler/rustc_save_analysis/src | |
| parent | 9a27044f42ace9eb652781b53f598e25d4e7e918 (diff) | |
| download | rust-489ad8b8b511df0d19fa3ef825240d020d240d3e.tar.gz rust-489ad8b8b511df0d19fa3ef825240d020d240d3e.zip | |
Revert "Revert "Merge CrateDisambiguator into StableCrateId""
This reverts commit 8176ab8bc18fdd7d3c2cf7f720c51166364c33a3.
Diffstat (limited to 'compiler/rustc_save_analysis/src')
| -rw-r--r-- | compiler/rustc_save_analysis/src/dump_visitor.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_save_analysis/src/lib.rs | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/compiler/rustc_save_analysis/src/dump_visitor.rs b/compiler/rustc_save_analysis/src/dump_visitor.rs index 54b6a121585..842f7f9deee 100644 --- a/compiler/rustc_save_analysis/src/dump_visitor.rs +++ b/compiler/rustc_save_analysis/src/dump_visitor.rs @@ -142,12 +142,7 @@ impl<'tcx> DumpVisitor<'tcx> { let data = CratePreludeData { crate_id: GlobalCrateId { name: name.into(), - disambiguator: self - .tcx - .sess - .local_crate_disambiguator() - .to_fingerprint() - .as_value(), + disambiguator: (self.tcx.sess.local_stable_crate_id().to_u64(), 0), }, crate_root: crate_root.unwrap_or_else(|| "<no source>".to_owned()), external_crates: self.save_ctxt.get_external_crates(), diff --git a/compiler/rustc_save_analysis/src/lib.rs b/compiler/rustc_save_analysis/src/lib.rs index 4c3cd67ddc6..ef2bae5e287 100644 --- a/compiler/rustc_save_analysis/src/lib.rs +++ b/compiler/rustc_save_analysis/src/lib.rs @@ -127,7 +127,10 @@ impl<'tcx> SaveContext<'tcx> { num: n.as_u32(), id: GlobalCrateId { name: self.tcx.crate_name(n).to_string(), - disambiguator: self.tcx.crate_disambiguator(n).to_fingerprint().as_value(), + disambiguator: ( + self.tcx.def_path_hash(n.as_def_id()).stable_crate_id().to_u64(), + 0, + ), }, }); } |
