Files
rust/library/core/src/num
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
..
2023-04-07 23:49:20 +02:00
2022-08-09 10:20:49 -07:00
2021-07-27 16:02:35 -04:00
2021-12-14 16:40:43 +01:00
2023-06-16 16:03:19 -07:00
2023-04-17 09:27:07 +00:00
2023-04-16 06:49:27 +00:00