From f3bc691556bfa67b240008f6c38834842a6e4c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Sun, 26 Dec 2021 20:50:15 +0100 Subject: [PATCH] Inline DefId hash implementation --- compiler/rustc_span/src/def_id.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_span/src/def_id.rs b/compiler/rustc_span/src/def_id.rs index d15befbf28730..25e2861fbe28d 100644 --- a/compiler/rustc_span/src/def_id.rs +++ b/compiler/rustc_span/src/def_id.rs @@ -247,6 +247,7 @@ pub struct DefId { // faster than another `FxHash` round. #[cfg(target_pointer_width = "64")] impl Hash for DefId { + #[inline] fn hash(&self, h: &mut H) { (((self.krate.as_u32() as u64) << 32) | (self.index.as_u32() as u64)).hash(h) }