about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroli <github35764891676564198441@oli-obk.de>2020-11-19 14:57:30 +0000
committeroli <github35764891676564198441@oli-obk.de>2020-11-19 14:57:30 +0000
commit58d62b83711b5f1401509b97a1340495f9907134 (patch)
tree3fdf078191438b678bcc49349dafc3335f58a938
parentdfca61a4c22d3cd1bc6b7a493de6f6763223b71f (diff)
downloadrust-58d62b83711b5f1401509b97a1340495f9907134.tar.gz
rust-58d62b83711b5f1401509b97a1340495f9907134.zip
Inform tidy about the reason for the ignored rust code
-rw-r--r--library/core/src/alloc/global.rs2
-rw-r--r--library/core/src/alloc/mod.rs2
2 files changed, 2 insertions, 2 deletions
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); }