about summary refs log tree commit diff
path: root/library/std
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-06-16 14:46:15 +0530
committerGitHub <noreply@github.com>2023-06-16 14:46:15 +0530
commit627f85cd5a80c18036e38cdfbe0b7a5ad94f7f26 (patch)
tree994453a446ca516c4643c4549ea6355470d4ebd4 /library/std
parent64f6c00772321324d77dfd8a0ee708fbb0d9a277 (diff)
parent3b9b4e5e3d6b45be6d355f0685eb70d99c3ab50a (diff)
downloadrust-627f85cd5a80c18036e38cdfbe0b7a5ad94f7f26.tar.gz
rust-627f85cd5a80c18036e38cdfbe0b7a5ad94f7f26.zip
Rollup merge of #112535 - RalfJung:miri-test-libstd, r=cuviper
reorder attributes to make miri-test-libstd work again

Fixes fallout from https://github.com/rust-lang/rust/pull/110141
Diffstat (limited to 'library/std')
-rw-r--r--library/std/src/lib.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index d53f1a2b2ff..da08c018d0e 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -188,6 +188,13 @@
 //! [array]: prim@array
 //! [slice]: prim@slice
 
+// To run std tests without x.py without ending up with two copies of std, 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))]
+// miri-test-libstd also prefers to make std use the sysroot versions of the dependencies.
+#![cfg_attr(feature = "miri-test-libstd", feature(rustc_private))]
+//
 #![cfg_attr(not(feature = "restricted-std"), stable(feature = "rust1", since = "1.0.0"))]
 #![cfg_attr(feature = "restricted-std", unstable(feature = "restricted_std", issue = "none"))]
 #![doc(
@@ -202,12 +209,6 @@
     no_global_oom_handling,
     not(no_global_oom_handling)
 ))]
-// To run std tests without x.py without ending up with two copies of std, 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))]
-// miri-test-libstd also prefers to make std use the sysroot versions of the dependencies.
-#![cfg_attr(feature = "miri-test-libstd", feature(rustc_private))]
 // Don't link to std. We are std.
 #![no_std]
 // Tell the compiler to link to either panic_abort or panic_unwind