Skip to content

Commit

Permalink
Use cfg_attr for kani::modifies
Browse files Browse the repository at this point in the history
  • Loading branch information
zhassan-aws committed Dec 2, 2024
1 parent 378c78a commit 25a2025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/ptr/non_null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ impl<T: ?Sized> NonNull<T> {
#[inline(always)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
#[stable(feature = "non_null_convenience", since = "1.80.0")]
#[kani::modifies(self.as_ptr())]
#[cfg_attr(kani, kani::modifies(self.as_ptr()))]
#[requires(ub_checks::can_write(self.as_ptr()))]
pub unsafe fn write_volatile(self, val: T)
where
Expand Down

0 comments on commit 25a2025

Please sign in to comment.