- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
C-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.
Description
Maybe this is not a bug, but I was expecting the documentation of associated constants to work in the same way as it does for functions.
I tried this code:
pub trait MyConstants {
    const A: usize;
    const B: usize;
    const TOTAL: usize = Self::A + Self::B;
}I was expecting the documentation to show e.g. A and B as required, and then TOTAL would just be auto generated. Same way as it happens with functions of a trait.
In practice it does work like that. I can implement only A and B, and then TOTAL will be auto implemented. The problem is that the documentation is not generated in a way that shows this, it simply looks as if all 3 constants are needed.
Metadata
Metadata
Assignees
Labels
C-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.