From f4e2b954a1749bb215eb0f1365e7d1f95162d3ba Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sun, 5 Feb 2023 18:53:47 +0400 Subject: rustc_metadata: Encode/decode `DefPathHash`es without an `Option` --- compiler/rustc_span/src/def_id.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/rustc_span') diff --git a/compiler/rustc_span/src/def_id.rs b/compiler/rustc_span/src/def_id.rs index 7c5e1427d1e..cdda052f529 100644 --- a/compiler/rustc_span/src/def_id.rs +++ b/compiler/rustc_span/src/def_id.rs @@ -119,6 +119,12 @@ impl DefPathHash { } } +impl Default for DefPathHash { + fn default() -> Self { + DefPathHash(Fingerprint::ZERO) + } +} + impl Borrow for DefPathHash { #[inline] fn borrow(&self) -> &Fingerprint { -- cgit 1.4.1-3-g733a5