Open clarfonthey opened 3 months ago
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.
rustdoc --version --verbose:
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
@rustbot label -needs-triage +T-rustdoc
For some code that generates my command prompt, I use a single ASCII character for the discriminant of an enum:
However, rustdoc displays this as:
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
: