Rollup merge of #109213 - oli-obk:cstore, r=cjgillot
Eagerly intern and check CrateNum/StableCrateId collisions r? ``@cjgillot`` It seems better to check things ahead of time than checking them afterwards. The [previous version](https://github.com/rust-lang/rust/pull/108390) was a bit nonsensical, so this addresses the feedback
This commit is contained in:
commit
950aa3ef86
7 changed files with 33 additions and 61 deletions
|
@ -18,3 +18,4 @@ tracing = "0.1"
|
|||
sha1 = "0.10.0"
|
||||
sha2 = "0.10.1"
|
||||
md5 = { package = "md-5", version = "0.10.0" }
|
||||
indexmap = { version = "1.9.1" }
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
use crate::{HashStableContext, Symbol};
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
|
||||
use rustc_data_structures::unhash::Unhasher;
|
||||
use rustc_data_structures::AtomicRef;
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_macros::HashStable_Generic;
|
||||
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::hash::{BuildHasherDefault, Hash, Hasher};
|
||||
|
||||
pub type StableCrateIdMap =
|
||||
indexmap::IndexMap<StableCrateId, CrateNum, BuildHasherDefault<Unhasher>>;
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
#[custom_encodable]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue