diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-02-05 18:53:47 +0400 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-02-05 18:53:47 +0400 |
| commit | f4e2b954a1749bb215eb0f1365e7d1f95162d3ba (patch) | |
| tree | bd2b0569731441d2cd30712f1ea2fe5ce6ad6b5f /compiler/rustc_span/src/def_id.rs | |
| parent | c60cc439858a028d8ecc2be1e7468c04cc36e8f2 (diff) | |
| download | rust-f4e2b954a1749bb215eb0f1365e7d1f95162d3ba.tar.gz rust-f4e2b954a1749bb215eb0f1365e7d1f95162d3ba.zip | |
rustc_metadata: Encode/decode `DefPathHash`es without an `Option`
Diffstat (limited to 'compiler/rustc_span/src/def_id.rs')
| -rw-r--r-- | compiler/rustc_span/src/def_id.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<Fingerprint> for DefPathHash { #[inline] fn borrow(&self) -> &Fingerprint { |
