-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
rustdoc: #[doc(notable_trait)] doesn't work on re-exports #81143
Copy link
Copy link
Open
Labels
A-local-reexportsArea: Documentation that has been locally re-exported (i.e., non-cross-crate)Area: Documentation that has been locally re-exported (i.e., non-cross-crate)A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
A-local-reexportsArea: Documentation that has been locally re-exported (i.e., non-cross-crate)Area: Documentation that has been locally re-exported (i.e., non-cross-crate)A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This code correctly triggers the "Notable traits" dialog:
But this does not:
The difference is that the first one puts
#[doc(spotlight)]on the trait,while the second puts it on the re-export. I'm not certain that this is supposed
to work, but there is code in
src/librustdoc/clean/inline.rs, which seems tobe used for re-exports, that supposedly detects
#[doc(spotlight)]:rust/src/librustdoc/clean/inline.rs
Lines 194 to 212 in 4253153
That
build_external_traitfunction is called in two places, one of which is inthe
try_inlinefunction:rust/src/librustdoc/clean/inline.rs
Lines 58 to 62 in 4253153
This was discovered in #80965 (comment).
cc @jyn514