about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2021-03-08 19:35:53 -0800
committerCamelid <camelidcamel@gmail.com>2021-03-15 13:59:54 -0700
commit34c6cee397183974b34a6e04c94b38202eb40caf (patch)
tree1780fe720a331dc9bcae1a0e4df3f0a25e5ca61d /library/std/src
parent2ccf06302c08d7d4911aad40e66a9a3ee731c6f9 (diff)
downloadrust-34c6cee397183974b34a6e04c94b38202eb40caf.tar.gz
rust-34c6cee397183974b34a6e04c94b38202eb40caf.zip
Rename `#[doc(spotlight)]` to `#[doc(notable_trait)]`
"spotlight" is not a very specific or self-explaining name.
Additionally, the dialog that it triggers is called "Notable traits".
So, "notable trait" is a better name.

* Rename `#[doc(spotlight)]` to `#[doc(notable_trait)]`
* Rename `#![feature(doc_spotlight)]` to `#![feature(doc_notable_trait)]`
* Update documentation
* Improve documentation
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/mod.rs6
-rw-r--r--library/std/src/lib.rs3
2 files changed, 6 insertions, 3 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index 17002e3b860..37bba56177a 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -505,7 +505,8 @@ pub(crate) fn default_read_exact<R: Read + ?Sized>(this: &mut R, mut buf: &mut [
 /// [`std::io`]: self
 /// [`File`]: crate::fs::File
 #[stable(feature = "rust1", since = "1.0.0")]
-#[doc(spotlight)]
+#[cfg_attr(bootstrap, doc(spotlight))]
+#[cfg_attr(not(bootstrap), doc(notable_trait))]
 pub trait Read {
     /// Pull some bytes from this source into the specified buffer, returning
     /// how many bytes were read.
@@ -1291,7 +1292,8 @@ impl Initializer {
 ///
 /// [`write_all`]: Write::write_all
 #[stable(feature = "rust1", since = "1.0.0")]
-#[doc(spotlight)]
+#[cfg_attr(bootstrap, doc(spotlight))]
+#[cfg_attr(not(bootstrap), doc(notable_trait))]
 pub trait Write {
     /// Write a buffer into this writer, returning how many bytes were written.
     ///
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index 8149858e103..33034b833ba 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -257,7 +257,8 @@
 #![feature(doc_cfg)]
 #![feature(doc_keyword)]
 #![feature(doc_masked)]
-#![feature(doc_spotlight)]
+#![cfg_attr(bootstrap, feature(doc_spotlight))]
+#![cfg_attr(not(bootstrap), feature(doc_notable_trait))]
 #![feature(dropck_eyepatch)]
 #![feature(duration_constants)]
 #![feature(duration_zero)]