File tree Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ unsafe fn has_valid_value<T: ?Sized>(_ptr: *const T) -> bool {
300
300
/// Check whether `len * size_of::<T>()` bytes are initialized starting from `ptr`.
301
301
#[ rustc_diagnostic_item = "KaniIsInitialized" ]
302
302
#[ inline( never) ]
303
- pub fn is_initialized < T : ?Sized > ( _ptr : * const T ) -> bool {
303
+ pub ( crate ) fn is_initialized < T : ?Sized > ( _ptr : * const T ) -> bool {
304
304
kani_intrinsic ( )
305
305
}
306
306
@@ -311,13 +311,25 @@ fn assert_is_initialized<T: ?Sized>(ptr: *const T) -> bool {
311
311
}
312
312
313
313
/// Get the object ID of the given pointer.
314
+ #[ doc( hidden) ]
315
+ #[ crate :: unstable(
316
+ feature = "ghost-state" ,
317
+ issue = 3184 ,
318
+ reason = "experimental ghost state/shadow memory API"
319
+ ) ]
314
320
#[ rustc_diagnostic_item = "KaniPointerObject" ]
315
321
#[ inline( never) ]
316
322
pub fn pointer_object < T : ?Sized > ( _ptr : * const T ) -> usize {
317
323
kani_intrinsic ( )
318
324
}
319
325
320
326
/// Get the object offset of the given pointer.
327
+ #[ doc( hidden) ]
328
+ #[ crate :: unstable(
329
+ feature = "ghost-state" ,
330
+ issue = 3184 ,
331
+ reason = "experimental ghost state/shadow memory API"
332
+ ) ]
321
333
#[ rustc_diagnostic_item = "KaniPointerOffset" ]
322
334
#[ inline( never) ]
323
335
pub fn pointer_offset < T : ?Sized > ( _ptr : * const T ) -> usize {
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ macro_rules! kani_mem {
306
306
/// Check whether `len * size_of::<T>()` bytes are initialized starting from `ptr`.
307
307
#[ rustc_diagnostic_item = "KaniIsInitialized" ]
308
308
#[ inline( never) ]
309
- pub fn is_initialized<T : ?Sized >( _ptr: * const T ) -> bool {
309
+ pub ( crate ) fn is_initialized<T : ?Sized >( _ptr: * const T ) -> bool {
310
310
kani_intrinsic( )
311
311
}
312
312
@@ -320,16 +320,30 @@ macro_rules! kani_mem {
320
320
}
321
321
322
322
/// Get the object ID of the given pointer.
323
+ // TODO: Add this back later, as there is no unstable attribute here.
324
+ // #[doc(hidden)]
325
+ // #[crate::unstable(
326
+ // feature = "ghost-state",
327
+ // issue = 3184,
328
+ // reason = "experimental ghost state/shadow memory API"
329
+ // )]
323
330
#[ rustc_diagnostic_item = "KaniPointerObject" ]
324
331
#[ inline( never) ]
325
- pub fn pointer_object<T : ?Sized >( _ptr: * const T ) -> usize {
332
+ pub ( crate ) fn pointer_object<T : ?Sized >( _ptr: * const T ) -> usize {
326
333
kani_intrinsic( )
327
334
}
328
335
329
336
/// Get the object offset of the given pointer.
337
+ // TODO: Add this back later, as there is no unstable attribute here.
338
+ // #[doc(hidden)]
339
+ // #[crate::unstable(
340
+ // feature = "ghost-state",
341
+ // issue = 3184,
342
+ // reason = "experimental ghost state/shadow memory API"
343
+ // )]
330
344
#[ rustc_diagnostic_item = "KaniPointerOffset" ]
331
345
#[ inline( never) ]
332
- pub fn pointer_offset<T : ?Sized >( _ptr: * const T ) -> usize {
346
+ pub ( crate ) fn pointer_offset<T : ?Sized >( _ptr: * const T ) -> usize {
333
347
kani_intrinsic( )
334
348
}
335
349
} ;
You can’t perform that action at this time.
0 commit comments