diff --git a/library/core/src/alloc/global.rs b/library/core/src/alloc/global.rs index 89d85bf291e..1ecf6abc754 100644 --- a/library/core/src/alloc/global.rs +++ b/library/core/src/alloc/global.rs @@ -61,7 +61,7 @@ use crate::ptr; /// More concretely, the following code example is unsound, irrespective of whether your /// custom allocator allows counting how many allocations have happened. /// -/// ```text +/// ```rust,ignore (unsound and has placeholders) /// drop(Box::new(42)); /// let number_of_heap_allocs = /* call private allocator API */; /// unsafe { std::intrinsics::assume(number_of_heap_allocs > 0); } diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs index d174842bcbf..1616d8fab21 100644 --- a/library/core/src/alloc/mod.rs +++ b/library/core/src/alloc/mod.rs @@ -100,7 +100,7 @@ pub unsafe trait AllocRef { /// More concretely, the following code example is unsound, irrespective of whether your /// custom allocator allows counting how many allocations have happened. /// - /// ```text + /// ```rust,ignore (unsound and has placeholders) /// Global::dealloc(Global::alloc(some_layout)); /// let number_of_heap_allocs = /* call private allocator API */; /// unsafe { std::intrinsics::assume(number_of_heap_allocs > 0); }