You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Associated constant formatting in docs should mirror source #42759
If I render the rustdocs for MyStruct, the following is displayed:
KIND:MyStruct = MyStruct(4)
Instead, I would like to see:
KIND:MyStruct = MyStruct(0b0100)
Or, at the very least:
KIND:MyStruct = MyStruct(0b100)
I've declared the KIND constant as a binary number because it serves as a mask. I want the rustdocs to reflect this. Said another way, the representation used in the source code is meaningful, and the rustdocs should preserve that meaning. Note that this should also apply to other representations including hexadecimal. This format-preserving behavior should also apply to other constants, not just associated constants.
Activity
ollie27 commentedon Nov 22, 2019
Fixed by #53409. We don't show the values of consts anymore.