Skip to content

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

Closed

Description

  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/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions