diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2022-11-18 17:48:17 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-18 17:48:17 -0500 |
| commit | e2301154e3c39f4bf606b6137d9cf5bf29a5f52e (patch) | |
| tree | 42ede50a548eb290598b8241a67a1cdc649ebcaa /src/test/rustdoc-ui/coverage/json.rs | |
| parent | 6b09d60f82180a9138b0299df1dbc23d78b59920 (diff) | |
| parent | 9d4b1f98e6761e9a6c77a840fcaec1aea0741669 (diff) | |
| download | rust-e2301154e3c39f4bf606b6137d9cf5bf29a5f52e.tar.gz rust-e2301154e3c39f4bf606b6137d9cf5bf29a5f52e.zip | |
Rollup merge of #103456 - scottmcm:fix-unchecked-shifts, r=scottmcm
`unchecked_{shl|shr}` should use `u32` as the RHS
The other shift methods, such as https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.checked_shr and https://doc.rust-lang.org/nightly/std/primitive.i16.html#method.wrapping_shl, use `u32` for the shift amount. That's consistent with other things, like `count_ones`, which also always use `u32` for a bit count, regardless of the size of the type.
This PR changes `unchecked_shl` and `unchecked_shr` to also use `u32` for the shift amount (rather than Self).
cc #85122, the `unchecked_math` tracking issue
Diffstat (limited to 'src/test/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions
