diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 72fe84222dea..dd04f782f940 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 630876445ba8..e10d01b58b01 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",