Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc converts byte literal discriminants into decimal numbers #128347

Open
clarfonthey opened this issue Jul 29, 2024 · 1 comment
Open

rustdoc converts byte literal discriminants into decimal numbers #128347

clarfonthey opened this issue Jul 29, 2024 · 1 comment
Assignees
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Comments

@clarfonthey
Copy link
Contributor

For some code that generates my command prompt, I use a single ASCII character for the discriminant of an enum:

pub enum Permissions {
    Guest = b'%',
    User = b'$',
    System = b'@',
    Absolute = b'#',
}

However, rustdoc displays this as:

pub enum Permissions {
    Guest = 37,
    User = 36,
    System = 64,
    Absolute = 35,
}

Personally, I think that rustdoc should try to display the literal as it was originally written, rather than converting it to a plain integer.

Meta

rustdoc --version --verbose:

rustdoc 1.81.0-nightly (9057c3ffe 2024-07-19)
binary: rustdoc
commit-hash: 9057c3ffec44926d5e149dc13ff3ce1613b69cce
commit-date: 2024-07-19
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7
@clarfonthey clarfonthey added the C-bug Category: This is a bug. label Jul 29, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 29, 2024
@jieyouxu jieyouxu added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 29, 2024
@veera-sivarajan
Copy link
Contributor

@rustbot label -needs-triage +T-rustdoc

@rustbot rustbot removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 29, 2024
@aDotInTheVoid aDotInTheVoid added A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jul 29, 2024
@lolbinarycat lolbinarycat self-assigned this Oct 20, 2024
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants