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
..
dec2flt Improve the floating point parser in dec2flt. 2023-04-10 00:47:08 +02:00
flt2dec Add shortcut for Grisu3 algorithm. 2023-04-25 11:34:57 +08:00
shells Fix wrong type in docs: i16 -> u16 2023-04-07 23:49:20 +02:00
bignum.rs Rename integer log* methods to ilog* 2022-08-09 10:20:49 -07:00
diy_float.rs Fix assert in diy_float 2021-07-27 16:02:35 -04:00
error.rs Add #[inline] to functions that are never called 2023-05-07 12:41:37 +01:00
f32.rs Add diagnostic items for f32::NAN and f64::NAN 2023-06-09 17:46:33 +02:00
f64.rs Add diagnostic items for f32::NAN and f64::NAN 2023-06-09 17:46:33 +02:00
fmt.rs Fix a bunch of typos 2021-12-14 16:40:43 +01:00
int_log10.rs Have a function for the log(0) panic, rather than copy-pasting the string constant 2023-02-10 12:50:17 -08:00
int_macros.rs Implement midpoint for all signed and unsigned integers 2023-04-26 10:18:53 +02:00
mod.rs [libs] Simplify unchecked_{shl,shr} 2023-06-16 16:03:19 -07:00
nonzero.rs Correct types in method descriptions of NonZero* types 2023-06-15 11:41:56 +08:00
saturating.rs Unimpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}<$t> for Saturating<$t> 2022-01-26 23:49:54 +01:00
uint_macros.rs fix codegen difference 2023-04-17 09:27:07 +00:00
wrapping.rs rm const traits in libcore 2023-04-16 06:49:27 +00:00