-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.F-doc_cfg`#![feature(doc_cfg)]``#![feature(doc_cfg)]`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.
Description
#![feature(doc_cfg)]
pub struct S;
#[doc(cfg(feature = "traits"))]
impl Eq for S {}
#[doc(cfg(feature = "traits"))]
impl PartialEq for S {
fn eq(&self, _rhs: &Self) -> bool {
true
}
}
cargo doc
renders this as follows. Notice that the blue banner appears for Eq (I guess because the trait is empty) but not for PartialEq. I believe that it should consistently appear for neither Eq nor PartialEq, or both Eq and PartialEq.
Expanding the [+] next to impl PartialEq shows the other blue banner but this issue is about the default appearance on page load.
Mentioning doc(cfg(...))
tracking issue #43781.
Mentioning @GuillaumeGomez @Nemo157
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.F-doc_cfg`#![feature(doc_cfg)]``#![feature(doc_cfg)]`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.