Make DummyHashStableContext dummier.
This commit is contained in:
parent
d1931b6406
commit
72e9589149
1 changed files with 5 additions and 5 deletions
|
@ -1330,12 +1330,12 @@ fn update_disambiguator(expn_id: ExpnId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> crate::HashStableContext for DummyHashStableContext<'a> {
|
impl<'a> crate::HashStableContext for DummyHashStableContext<'a> {
|
||||||
|
#[inline]
|
||||||
fn def_path_hash(&self, def_id: DefId) -> DefPathHash {
|
fn def_path_hash(&self, def_id: DefId) -> DefPathHash {
|
||||||
use std::hash::Hasher;
|
DefPathHash(Fingerprint::new(
|
||||||
let mut hasher = StableHasher::new();
|
def_id.krate.as_u32().into(),
|
||||||
hasher.write_u32(def_id.krate.as_u32());
|
def_id.index.as_u32().into(),
|
||||||
hasher.write_u32(def_id.index.as_u32());
|
))
|
||||||
DefPathHash(hasher.finish())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn expn_id_cache() -> &'static LocalKey<ExpnIdCache> {
|
fn expn_id_cache() -> &'static LocalKey<ExpnIdCache> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue