Closed
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