about summary refs log tree commit diff
path: root/src/libstd/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-17 00:09:49 +0000
committerbors <bors@rust-lang.org>2020-07-17 00:09:49 +0000
commit8534be72fc3b9c5f2f2dc4e4ee7b651a008e9a3e (patch)
tree9b6f6432be9c4a78fd4677f7a3125f3eb93e1a0a /src/libstd/lib.rs
parent5c9e5df3a097e094641f16dab501ab1c4da10e9f (diff)
parent5bb9bef79577b9629b12800dcdae1d8fd52998c0 (diff)
downloadrust-8534be72fc3b9c5f2f2dc4e4ee7b651a008e9a3e.tar.gz
rust-8534be72fc3b9c5f2f2dc4e4ee7b651a008e9a3e.zip
Auto merge of #74422 - Manishearth:rollup-7mfrf6g, r=Manishearth
Rollup of 8 pull requests

Successful merges:

 - #73101 (Resolve items for cross-crate imports relative to the original module)
 - #73269 (Enable some timeouts in SGX platform)
 - #74033 (Add build support for Cargo's build-std feature.)
 - #74351 (Do not render unstable items for rustc doc)
 - #74357 (Some `Symbol` related improvements)
 - #74371 (Improve ayu rustdoc theme)
 - #74386 (Add RISC-V GNU/Linux to src/tools/build-manifest as a host platform)
 - #74398 (Clean up E0723 explanation)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libstd/lib.rs')
-rw-r--r--src/libstd/lib.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index cbc24009a94..b5ba0da7ae5 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -198,7 +198,8 @@
 //! [primitive types]: ../book/ch03-02-data-types.html
 //! [rust-discord]: https://discord.gg/rust-lang
 
-#![stable(feature = "rust1", since = "1.0.0")]
+#![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(
     html_root_url = "https://doc.rust-lang.org/nightly/",
     html_playground_url = "https://play.rust-lang.org/",
@@ -554,3 +555,9 @@ include!("primitive_docs.rs");
 // the rustdoc documentation for the existing keywords. Using `include!`
 // because rustdoc only looks for these modules at the crate level.
 include!("keyword_docs.rs");
+
+// This is required to avoid an unstable error when `restricted-std` is not
+// enabled. The use of #![feature(restricted_std)] in rustc-std-workspace-std
+// is unconditional, so the unstable feature needs to be defined somewhere.
+#[cfg_attr(not(feature = "restricted-std"), unstable(feature = "restricted_std", issue = "none"))]
+mod __restricted_std_workaround {}