rust/library/core
bors 8d1fa473dd Auto merge of #112724 - scottmcm:simpler-unchecked-shifts, r=Mark-Simulacrum
[libs] Simplify `unchecked_{shl,shr}`

There's no need for the `const_eval_select` dance here.  And while I originally wrote the `.try_into().unwrap_unchecked()` implementation here, it's kinda a mess in MIR -- this new one is substantially simpler, as shown by the old one being above the inlining threshold but the new one being below it in the `mir-opt/inline/unchecked_shifts` tests.

We don't need `u32::checked_shl` doing a dance through both `Result` *and* `Option` 🙃
2023-06-19 04:48:35 +00:00
..
benches add benchmark 2023-06-12 13:03:29 +02:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Auto merge of #112724 - scottmcm:simpler-unchecked-shifts, r=Mark-Simulacrum 2023-06-19 04:48:35 +00:00
tests Extend unused_must_use to cover block exprs 2023-06-15 17:59:13 +08:00
Cargo.toml Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00