rust/library/core/src/num
bors 4b133a7e27 Auto merge of #94517 - aDotInTheVoid:inline_wrapping_next_power_two, r=yaahc
Mark `uint::wrapping_next_power_of_two` as `#[inline]`

This brings it in line with `next_power_of_two` and `checked_next_power_of_two`

https://godbolt.org/z/Tr18GnqKj

<details>
<summary> Output as of `rustc 1.61.0-nightly (4ce374923 2022-02-28)` </summary>

```asm
example::npot:
        lea     eax, [rdi - 1]
        movzx   eax, al
        lzcnt   ecx, eax
        add     ecx, -24
        mov     al, -1
        shr     al, cl
        inc     al
        cmp     dil, 2
        movzx   ecx, al
        mov     eax, 1
        cmovae  eax, ecx
        ret

example::cnpot:
        lea     eax, [rdi - 1]
        movzx   eax, al
        lzcnt   ecx, eax
        add     ecx, -24
        mov     al, -1
        shr     al, cl
        xor     ecx, ecx
        cmp     dil, 2
        movzx   edx, al
        cmovb   edx, ecx
        inc     dl
        setne   al
        ret

example::wrapping_next_power_of_two:
        jmp     qword ptr [rip + _ZN4core3num20_$LT$impl$u20$u8$GT$26wrapping_next_power_of_two17hd879a85055735264E@GOTPCREL]
```

</details>
2022-03-24 17:32:40 +00:00
..
dec2flt make float parsing docs more comprehensive 2022-03-10 22:26:30 -08:00
flt2dec Changed dec2flt to use the Eisel-Lemire algorithm. 2021-07-17 00:30:34 -05:00
shells Convert the rest of the standard library primitives to intra-doc links 2021-02-25 20:32:49 -05:00
bignum.rs Use carrying_{mul|add} in num::bignum 2022-01-15 20:22:34 -08:00
diy_float.rs Fix assert in diy_float 2021-07-27 16:02:35 -04:00
error.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
f32.rs review the total_cmp documentation 2022-01-30 23:20:54 +02:00
f64.rs review the total_cmp documentation 2022-01-30 23:20:54 +02:00
fmt.rs Fix a bunch of typos 2021-12-14 16:40:43 +01:00
int_log10.rs Add log2 and log10 to NonZeroU* 2022-01-15 17:14:13 -08:00
int_macros.rs remove unnecessary try_opt for operations that cannot fail 2022-03-11 11:07:45 +01:00
mod.rs Add u16::is_utf16_surrogate 2022-03-21 22:51:32 -04:00
nonzero.rs Use Self::BITS in log2 implementation 2022-03-12 08:01:35 -05: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 Auto merge of #94517 - aDotInTheVoid:inline_wrapping_next_power_two, r=yaahc 2022-03-24 17:32:40 +00:00
wrapping.rs Stabilize wrapping_int_assign_impl in 1.60.0. 2022-02-07 11:45:12 +01:00