Skip to content

Commit

Permalink
Substitute unstable with pub(crate in kani_core
Browse files Browse the repository at this point in the history
  • Loading branch information
artemagvanian committed Jul 10, 2024
1 parent 96b47da commit e3ecf8d
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions library/kani_core/src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,28 +307,30 @@ macro_rules! kani_mem {
}

/// Get the object ID of the given pointer.
#[doc(hidden)]
#[$crate::unstable(
feature = "ghost-state",
issue = 3184,
reason = "experimental ghost state/shadow memory API"
)]
// TODO: Add this back later, as there is no unstable attribute here.
// #[doc(hidden)]
// #[crate::unstable(
// feature = "ghost-state",
// issue = 3184,
// reason = "experimental ghost state/shadow memory API"
// )]
#[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.
#[doc(hidden)]
#[$crate::unstable(
feature = "ghost-state",
issue = 3184,
reason = "experimental ghost state/shadow memory API"
)]
// TODO: Add this back later, as there is no unstable attribute here.
// #[doc(hidden)]
// #[crate::unstable(
// feature = "ghost-state",
// issue = 3184,
// reason = "experimental ghost state/shadow memory API"
// )]
#[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 e3ecf8d

Please sign in to comment.