From 486b32152e6c9035ed032b4ba6d1f1dddcd06478 Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Thu, 1 Apr 2021 16:55:16 -0700 Subject: Upgrade rust/crates/hashbrown to 0.11.2 Test: make Change-Id: I635dccc3bc3cd89b50a49c08f6c7010d0a883e70 --- src/raw/sse2.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/raw/sse2.rs') diff --git a/src/raw/sse2.rs b/src/raw/sse2.rs index a27bc09..eed9684 100644 --- a/src/raw/sse2.rs +++ b/src/raw/sse2.rs @@ -28,12 +28,13 @@ impl Group { /// value for an empty hash table. /// /// This is guaranteed to be aligned to the group size. + #[allow(clippy::items_after_statements)] pub const fn static_empty() -> &'static [u8; Group::WIDTH] { #[repr(C)] struct AlignedBytes { _align: [Group; 0], bytes: [u8; Group::WIDTH], - }; + } const ALIGNED_BYTES: AlignedBytes = AlignedBytes { _align: [], bytes: [EMPTY; Group::WIDTH], @@ -45,7 +46,7 @@ impl Group { #[inline] #[allow(clippy::cast_ptr_alignment)] // unaligned load pub unsafe fn load(ptr: *const u8) -> Self { - Group(x86::_mm_loadu_si128(ptr as *const _)) + Group(x86::_mm_loadu_si128(ptr.cast())) } /// Loads a group of bytes starting at the given address, which must be @@ -55,7 +56,7 @@ impl Group { pub unsafe fn load_aligned(ptr: *const u8) -> Self { // FIXME: use align_offset once it stabilizes debug_assert_eq!(ptr as usize & (mem::align_of::() - 1), 0); - Group(x86::_mm_load_si128(ptr as *const _)) + Group(x86::_mm_load_si128(ptr.cast())) } /// Stores the group of bytes to the given address, which must be @@ -65,7 +66,7 @@ impl Group { pub unsafe fn store_aligned(self, ptr: *mut u8) { // FIXME: use align_offset once it stabilizes debug_assert_eq!(ptr as usize & (mem::align_of::() - 1), 0); - x86::_mm_store_si128(ptr as *mut _, self.0); + x86::_mm_store_si128(ptr.cast(), self.0); } /// Returns a `BitMask` indicating all bytes in the group which have -- cgit v1.2.3