Skip to content

Commit

Permalink
Fix visibility of some kani intrinsics inside mem.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
artemagvanian committed Jul 3, 2024
1 parent d926482 commit e3cd8ba
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit e3cd8ba

Please sign in to comment.