Skip to content

Commit f802bc0

Browse files
committed
Auto merge of rust-lang#80965 - camelid:rename-doc-spotlight, r=jyn514
Rename `#[doc(spotlight)]` to `#[doc(notable_trait)]` Fixes rust-lang#80936. "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 r? `@Manishearth`
2 parents 64160ac + 4739a86 commit f802bc0

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
@@ -109,7 +109,8 @@
109109
#![feature(custom_inner_attributes)]
110110
#![feature(decl_macro)]
111111
#![feature(doc_cfg)]
112-
#![feature(doc_spotlight)]
112+
#![cfg_attr(bootstrap, feature(doc_spotlight))]
113+
#![cfg_attr(not(bootstrap), feature(doc_notable_trait))]
113114
#![feature(duration_consts_2)]
114115
#![feature(duration_saturating_ops)]
115116
#![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.
@@ -1296,7 +1297,8 @@ impl Initializer {
12961297
///
12971298
/// [`write_all`]: Write::write_all
12981299
#[stable(feature = "rust1", since = "1.0.0")]
1299-
#[doc(spotlight)]
1300+
#[cfg_attr(bootstrap, doc(spotlight))]
1301+
#[cfg_attr(not(bootstrap), doc(notable_trait))]
13001302
pub trait Write {
13011303
/// Write a buffer into this writer, returning how many bytes were written.
13021304
///

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)