From ad8d304163a8c0e8a20d4a1d9783734586273f4a Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Sun, 16 Apr 2023 09:44:03 -0400 Subject: [PATCH] Implement StableHasher::write_u128 via write_u64 --- compiler/rustc_data_structures/src/stable_hasher.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_data_structures/src/stable_hasher.rs b/compiler/rustc_data_structures/src/stable_hasher.rs index 3ed1de1bc3c..1608009809f 100644 --- a/compiler/rustc_data_structures/src/stable_hasher.rs +++ b/compiler/rustc_data_structures/src/stable_hasher.rs @@ -107,7 +107,8 @@ fn write_u64(&mut self, i: u64) { #[inline] fn write_u128(&mut self, i: u128) { - self.state.write(&i.to_le_bytes()); + self.write_u64(i as u64); + self.write_u64((i >> 64) as u64); } #[inline]