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

Strange hexadecimal comment at the end of a const in documentation #85088

Closed
wooster0 opened this issue May 8, 2021 · 1 comment · Fixed by #94091
Closed

Strange hexadecimal comment at the end of a const in documentation #85088

wooster0 opened this issue May 8, 2021 · 1 comment · Fixed by #94091
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@wooster0
Copy link
Contributor

wooster0 commented May 8, 2021

  1. Create a new crate.
  2. Put for instance const HOUR_IN_SECONDS: u64 = 60 * 60; into src/main.rs.
  3. cargo doc --open.
  4. Navigate to the constant.
  5. See pub(crate) const HOUR_IN_SECONDS: u64 = 60 * 60; // 0x0_000_000_000_000_e10u64.

There is a long and very hard to read commented hexadecimal number at the end, 3600 in decimal. Why is it there and how is it useful to the documentation reader? Shouldn't it at least be in decimal?
Is this perhaps a bug?

I also can't find any documentation or sources on this behavior like in https://doc.rust-lang.org/rustdoc/.

@wooster0
Copy link
Contributor Author

wooster0 commented May 8, 2021

@rustbot label A-rustdoc

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 8, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 19, 2022
…ed-value, r=oli-obk

Fix rustdoc const computed value

Fixes rust-lang#85088.

It looks like this now (instead of hexadecimal):

![Screenshot from 2022-02-17 17-55-39](https://user-images.githubusercontent.com/3050060/154532115-0f9861a0-406f-4c9c-957f-32bedd8aca7d.png)

r? `@oli-obk`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 19, 2022
…ed-value, r=oli-obk

Fix rustdoc const computed value

Fixes rust-lang#85088.

It looks like this now (instead of hexadecimal):

![Screenshot from 2022-02-17 17-55-39](https://user-images.githubusercontent.com/3050060/154532115-0f9861a0-406f-4c9c-957f-32bedd8aca7d.png)

r? ``@oli-obk``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 19, 2022
…ed-value, r=oli-obk

Fix rustdoc const computed value

Fixes rust-lang#85088.

It looks like this now (instead of hexadecimal):

![Screenshot from 2022-02-17 17-55-39](https://user-images.githubusercontent.com/3050060/154532115-0f9861a0-406f-4c9c-957f-32bedd8aca7d.png)

r? ```@oli-obk```
@bors bors closed this as completed in 9e9cc66 Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants