diff options
Diffstat (limited to 'compiler/rustc_data_structures/src/hashes.rs')
| -rw-r--r-- | compiler/rustc_data_structures/src/hashes.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/hashes.rs b/compiler/rustc_data_structures/src/hashes.rs index 8f4639fc2e6..b25758048bd 100644 --- a/compiler/rustc_data_structures/src/hashes.rs +++ b/compiler/rustc_data_structures/src/hashes.rs @@ -35,6 +35,11 @@ impl Hash64 { pub fn as_u64(self) -> u64 { self.inner } + + #[inline] + pub fn wrapping_add(self, other: Self) -> Self { + Self { inner: self.inner.wrapping_add(other.inner) } + } } impl BitXorAssign<u64> for Hash64 { |
