1
Fork 0
rust/library/coretests/tests
Matthias Krüger 88ed69c035
Rollup merge of #137383 - folkertdev:stabilize-unsigned-is-multiple-of, r=Noratrieb
stabilize `unsigned_is_multiple_of`

tracking issue: https://github.com/rust-lang/rust/issues/128101
fcp completed in: https://github.com/rust-lang/rust/issues/128101#issuecomment-2674880635

### Public API

A version of this for all the unsigned types

```rust
fn is_multiple_of(lhs: u64, rhs: u64) -> bool {
    match rhs {
        // prevent division by zero
        0 => lhs == 0,
        _ => lhs % rhs == 0,
    }
}
```
2025-02-23 00:16:20 +01:00
..
async_iter
ffi
fmt
hash
io Migrate coretests to Rust 2024 2025-02-13 13:10:21 -08:00
iter Rustfmt 2025-02-08 22:12:13 +00:00
net
num Rollup merge of #136910 - okaneco:sig_ones, r=thomcc 2025-02-22 11:36:42 +01:00
ops
panic
alloc.rs
any.rs Optionally add type names to TypeIds. 2025-02-11 18:42:19 -08:00
array.rs
ascii.rs
ascii_char.rs Implement Extend<AsciiChar> for String 2025-02-08 16:51:04 -05:00
asserting.rs
atomic.rs
bool.rs Remove some unnecessary parens in assert! conditions 2025-02-06 22:28:44 +00:00
bstr.rs
cell.rs
char.rs add MAX_LEN_UTF8 and MAX_LEN_UTF16 constants 2025-02-16 21:08:38 +08:00
clone.rs
cmp.rs
const_ptr.rs
convert.rs
error.rs
ffi.rs
future.rs
intrinsics.rs
lazy.rs
lib.rs Rollup merge of #137383 - folkertdev:stabilize-unsigned-is-multiple-of, r=Noratrieb 2025-02-23 00:16:20 +01:00
macros.rs
macros_bootstrap.rs
manually_drop.rs
mem.rs Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
nonzero.rs Implement feature isolate_most_least_significant_one for integer types 2025-02-20 05:19:06 -05:00
ops.rs
option.rs
panic.rs
pattern.rs
pin.rs Migrate coretests to Rust 2024 2025-02-13 13:10:21 -08:00
pin_macro.rs
ptr.rs Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
result.rs
simd.rs
slice.rs Rollup merge of #136983 - ehuss:misc-2024-prep, r=tgross35 2025-02-14 14:05:24 -08:00
str.rs
str_lossy.rs
task.rs
time.rs
tuple.rs
unicode.rs
waker.rs