-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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
Consider the following struct and trait:
pub trait Trait {
/// Foo.
fn foo() { }
/// Bar.
const BAR: usize = 0;
}
pub struct Struct { }
impl Struct {
/// Foo.
pub fn foo() { }
/// Bar.
pub const BAR: usize = 0;
}
The sidebar generated by rustdoc for the trait is informative, allowing you to quickly jump to the methods and associated constants:
Sadly, the associated constant is completely missing in the sidebar for the struct:
This is particularly painful for types with many members, such as f32
. It is not immediately obvious which associated constants it has. In my opinion rustdoc should also generate an 'associated constants' section in the sidebar for types, not just for traits.
jsha and IndigoLily
Metadata
Metadata
Assignees
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.