Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix visibility of some Kani intrinsics #3323

Merged
6 changes: 3 additions & 3 deletions library/kani/src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,21 +294,21 @@ unsafe fn has_valid_value<T: ?Sized>(_ptr: *const T) -> bool {
/// Check whether `len * size_of::<T>()` bytes are initialized starting from `ptr`.
#[rustc_diagnostic_item = "KaniIsInitialized"]
#[inline(never)]
pub fn is_initialized<T: ?Sized>(_ptr: *const T, _len: usize) -> bool {
pub(crate) fn is_initialized<T: ?Sized>(_ptr: *const T, _len: usize) -> bool {
kani_intrinsic()
}

/// Get the object ID of the given pointer.
#[rustc_diagnostic_item = "KaniPointerObject"]
#[inline(never)]
pub fn pointer_object<T: ?Sized>(_ptr: *const T) -> usize {
pub(crate) fn pointer_object<T: ?Sized>(_ptr: *const T) -> usize {
kani_intrinsic()
}

/// Get the object offset of the given pointer.
#[rustc_diagnostic_item = "KaniPointerOffset"]
#[inline(never)]
pub fn pointer_offset<T: ?Sized>(_ptr: *const T) -> usize {
pub(crate) fn pointer_offset<T: ?Sized>(_ptr: *const T) -> usize {
kani_intrinsic()
}

Expand Down
Loading