about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-10-08 22:30:41 +0200
committerGitHub <noreply@github.com>2021-10-08 22:30:41 +0200
commit1c359687735dedf67323cb4d95ede830b6892f0f (patch)
tree015c8efce9462acf0913f530db16dfed21b178e7
parent836597a881ae99b16a00dd57f314ee98e1927a7b (diff)
parent0a03ec4724b5196fece39229a11874f1d3a5cffe (diff)
Rollup merge of #89668 - Urgau:core-cfg-hide, r=GuillaumeGomez
Cfg hide more conditions for core and alloc

Fixes https://github.com/rust-lang/rust/issues/89663

Before:
![image](https://user-images.githubusercontent.com/3616612/136572816-a7844ac7-dc2f-4d79-87b4-7f9766421a83.png)

After:
![image](https://user-images.githubusercontent.com/3616612/136572745-7d890726-8efd-4d74-83ac-ed06f4687741.png)

*Same for alloc*

r? ``@GuillaumeGomez``
-rw-r--r--library/alloc/src/lib.rs7
-rw-r--r--library/core/src/lib.rs1
2 files changed, 7 insertions, 1 deletions
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs
index 72fe84222de..dd04f782f94 100644
--- a/library/alloc/src/lib.rs
+++ b/library/alloc/src/lib.rs
@@ -69,7 +69,12 @@
 )]
 #![cfg_attr(
     not(bootstrap),
-    doc(cfg_hide(not(test), not(any(test, bootstrap)), target_has_atomic = "ptr"))
+    doc(cfg_hide(
+        not(test),
+        not(any(test, bootstrap)),
+        any(not(feature = "miri-test-libstd"), test, doctest),
+        target_has_atomic = "ptr"
+    ))
 )]
 #![no_std]
 #![needs_allocator]
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index 630876445ba..e10d01b58b0 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -64,6 +64,7 @@
     not(bootstrap),
     doc(cfg_hide(
         not(test),
+        any(not(feature = "miri-test-libstd"), test, doctest),
         target_pointer_width = "16",
         target_pointer_width = "32",
         target_pointer_width = "64",