summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-08-18 18:07:35 -0400
committerRalf Jung <post@ralfj.de>2022-08-18 18:07:39 -0400
commitfbcdf2a383f6b17f80d8c285af3fa9739aaf223c (patch)
tree774c394a8aa497591868f81fb37fff47cd815927 /library/alloc/src
parent438e49c1cba71d7ff8a138a1b96058c2d9a9d217 (diff)
downloadrust-fbcdf2a383f6b17f80d8c285af3fa9739aaf223c.tar.gz
rust-fbcdf2a383f6b17f80d8c285af3fa9739aaf223c.zip
clarify lib.rs attribute structure
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/lib.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs
index a6f3593addc..aea84ac90c1 100644
--- a/library/alloc/src/lib.rs
+++ b/library/alloc/src/lib.rs
@@ -56,11 +56,6 @@
 //! [`Rc`]: rc
 //! [`RefCell`]: core::cell
 
-// To run liballoc tests without x.py without ending up with two copies of liballoc, Miri needs to be
-// able to "empty" this crate. See <https://github.com/rust-lang/miri-test-libstd/issues/4>.
-// rustc itself never sets the feature, so this line has no affect there.
-#![cfg(any(not(feature = "miri-test-libstd"), test, doctest))]
-//
 #![allow(unused_attributes)]
 #![stable(feature = "alloc", since = "1.36.0")]
 #![doc(
@@ -78,6 +73,10 @@
 ))]
 #![no_std]
 #![needs_allocator]
+// To run liballoc tests without x.py without ending up with two copies of liballoc, Miri needs to be
+// able to "empty" this crate. See <https://github.com/rust-lang/miri-test-libstd/issues/4>.
+// rustc itself never sets the feature, so this line has no affect there.
+#![cfg(any(not(feature = "miri-test-libstd"), test, doctest))]
 //
 // Lints:
 #![deny(unsafe_op_in_unsafe_fn)]