about summary refs log tree commit diff
path: root/src/librustdoc/html/static/source-script.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-04 10:42:13 +0000
committerbors <bors@rust-lang.org>2021-05-04 10:42:13 +0000
commita5f164faad4a2fed606b8160fd7ecd2d5cbba381 (patch)
tree318743b90f017ba82b81ebf432d0e4f97737eee9 /src/librustdoc/html/static/source-script.js
parent7a0f1781d04662041db5deaef89598a8edd53717 (diff)
parentf84b4c51ce08a5db9a45017362a27cc33e6af34d (diff)
downloadrust-a5f164faad4a2fed606b8160fd7ecd2d5cbba381.tar.gz
rust-a5f164faad4a2fed606b8160fd7ecd2d5cbba381.zip
Auto merge of #84017 - Smittyvb:int-literal-underscores, r=jyn514
Valid underscores in hex/octal/binary literal docs

Currently hex/octal/binary literals with computed values are displayed like `0_xff_fff_fffu32`, which is invalid since underscores can't be in the middle of integer prefixes. This properly formats prefixed integers.

This causes  [`std::u32::MAX`](https://doc.rust-lang.org/std/u32/constant.MAX.html) to be displayed as
```rust
pub const MAX: u32 = u32::MAX; // 0_xff_fff_fffu32
```

This PR changes it to be displayed as:
```rust
pub const MAX: u32 = u32::MAX; // 0xffff_ffffu32
```
Diffstat (limited to 'src/librustdoc/html/static/source-script.js')
0 files changed, 0 insertions, 0 deletions