Closed
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.