Skip to content

Commit 4739a86

Browse files
committed
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
1 parent fc05235 commit 4739a86

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

core/src/future/future.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ use crate::task::{Context, Poll};
2424
/// `.await` the value.
2525
///
2626
/// [`Waker`]: crate::task::Waker
27-
#[doc(spotlight)]
27+
#[cfg_attr(bootstrap, doc(spotlight))]
28+
#[cfg_attr(not(bootstrap), doc(notable_trait))]
2829
#[must_use = "futures do nothing unless you `.await` or poll them"]
2930
#[stable(feature = "futures_api", since = "1.36.0")]
3031
#[lang = "future_trait"]

core/src/iter/traits/iterator.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item = ()>) {}
9292
label = "`{Self}` is not an iterator",
9393
message = "`{Self}` is not an iterator"
9494
)]
95-
#[doc(spotlight)]
95+
#[cfg_attr(bootstrap, doc(spotlight))]
96+
#[cfg_attr(not(bootstrap), doc(notable_trait))]
9697
#[rustc_diagnostic_item = "Iterator"]
9798
#[must_use = "iterators are lazy and do nothing unless consumed"]
9899
pub trait Iterator {

core/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@
108108
#![feature(custom_inner_attributes)]
109109
#![feature(decl_macro)]
110110
#![feature(doc_cfg)]
111-
#![feature(doc_spotlight)]
111+
#![cfg_attr(bootstrap, feature(doc_spotlight))]
112+
#![cfg_attr(not(bootstrap), feature(doc_notable_trait))]
112113
#![feature(duration_consts_2)]
113114
#![feature(duration_saturating_ops)]
114115
#![feature(extended_key_value_attributes)]

std/src/io/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ pub(crate) fn default_read_exact<R: Read + ?Sized>(this: &mut R, mut buf: &mut [
505505
/// [`std::io`]: self
506506
/// [`File`]: crate::fs::File
507507
#[stable(feature = "rust1", since = "1.0.0")]
508-
#[doc(spotlight)]
508+
#[cfg_attr(bootstrap, doc(spotlight))]
509+
#[cfg_attr(not(bootstrap), doc(notable_trait))]
509510
pub trait Read {
510511
/// Pull some bytes from this source into the specified buffer, returning
511512
/// how many bytes were read.
@@ -1291,7 +1292,8 @@ impl Initializer {
12911292
///
12921293
/// [`write_all`]: Write::write_all
12931294
#[stable(feature = "rust1", since = "1.0.0")]
1294-
#[doc(spotlight)]
1295+
#[cfg_attr(bootstrap, doc(spotlight))]
1296+
#[cfg_attr(not(bootstrap), doc(notable_trait))]
12951297
pub trait Write {
12961298
/// Write a buffer into this writer, returning how many bytes were written.
12971299
///

std/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@
257257
#![feature(doc_cfg)]
258258
#![feature(doc_keyword)]
259259
#![feature(doc_masked)]
260-
#![feature(doc_spotlight)]
260+
#![cfg_attr(bootstrap, feature(doc_spotlight))]
261+
#![cfg_attr(not(bootstrap), feature(doc_notable_trait))]
261262
#![feature(dropck_eyepatch)]
262263
#![feature(duration_constants)]
263264
#![feature(duration_zero)]

0 commit comments

Comments
 (0)