diff --git a/library/core/src/alloc/global.rs b/library/core/src/alloc/global.rs index e6fe1e89c10..4922028eee2 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. /// -/// ```rust,ignore +/// ```text /// 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 47d5ad9ad56..d174842bcbf 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. /// - /// ```rust,ignore + /// ```text /// Global::dealloc(Global::alloc(some_layout)); /// let number_of_heap_allocs = /* call private allocator API */; /// unsafe { std::intrinsics::assume(number_of_heap_allocs > 0); }