From f36b2558de3bd48d7ea3a11eebb61425bdc5964f Mon Sep 17 00:00:00 2001 From: ltdk Date: Sat, 4 Jul 2026 15:55:00 -0400 Subject: [PATCH] Fix provenance lint renaming --- src/lib.rs | 2 +- src/raw.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d0cfd10e4..8dcb59aa9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ strict_provenance_lints ) )] -#![cfg_attr(feature = "nightly", warn(fuzzy_provenance_casts))] +#![cfg_attr(feature = "nightly", warn(implicit_provenance_casts))] #![cfg_attr(feature = "rustc-dep-of-std", feature(rustc_attrs))] #![cfg_attr(feature = "nightly", expect(internal_features))] #![cfg_attr( diff --git a/src/raw.rs b/src/raw.rs index 94b2a5567..d42ae430d 100644 --- a/src/raw.rs +++ b/src/raw.rs @@ -389,7 +389,7 @@ impl Bucket { // where: T0...Tlast - our stored data; C0...Clast - control bytes or metadata for data. if T::IS_ZERO_SIZED { // this can not be UB - self.ptr.as_ptr() as usize - 1 + self.ptr.as_ptr().addr() - 1 } else { unsafe { offset_from(base.as_ptr(), self.ptr.as_ptr()) } } @@ -462,7 +462,7 @@ impl Bucket { unsafe fn next_n(&self, offset: usize) -> Self { let ptr = if T::IS_ZERO_SIZED { // invalid pointer is good enough for ZST - invalid_mut(self.ptr.as_ptr() as usize + offset) + invalid_mut(self.ptr.as_ptr().addr() + offset) } else { unsafe { self.ptr.as_ptr().sub(offset) } }; @@ -3577,7 +3577,7 @@ impl RawIterRange { #[cfg_attr(feature = "inline-more", inline)] unsafe fn new(ctrl: *const u8, data: Bucket, len: usize) -> Self { debug_assert_ne!(len, 0); - debug_assert_eq!(ctrl as usize % Group::WIDTH, 0); + debug_assert!(ctrl.cast::().is_aligned()); // SAFETY: The caller must uphold the safety rules for the [`RawIterRange::new`] let end = unsafe { ctrl.add(len) };