-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Associated constant formatting in docs should mirror source #42759
Copy link
Copy link
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.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.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
In my source code, I've declared an associated constant as follows:
If I render the rustdocs for
MyStruct, the following is displayed:Instead, I would like to see:
Or, at the very least:
I've declared the
KINDconstant 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.