Skip to content

Commit 72e9589

Browse files
committed
Make DummyHashStableContext dummier.
1 parent d1931b6 commit 72e9589

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/rustc_span/src/hygiene.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1330,12 +1330,12 @@ fn update_disambiguator(expn_id: ExpnId) {
13301330
}
13311331

13321332
impl<'a> crate::HashStableContext for DummyHashStableContext<'a> {
1333+
#[inline]
13331334
fn def_path_hash(&self, def_id: DefId) -> DefPathHash {
1334-
use std::hash::Hasher;
1335-
let mut hasher = StableHasher::new();
1336-
hasher.write_u32(def_id.krate.as_u32());
1337-
hasher.write_u32(def_id.index.as_u32());
1338-
DefPathHash(hasher.finish())
1335+
DefPathHash(Fingerprint::new(
1336+
def_id.krate.as_u32().into(),
1337+
def_id.index.as_u32().into(),
1338+
))
13391339
}
13401340

13411341
fn expn_id_cache() -> &'static LocalKey<ExpnIdCache> {

0 commit comments

Comments
 (0)