diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-23 00:16:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-23 00:16:20 +0100 |
| commit | 88ed69c0359253643195a3f38540d8442f2c7c9e (patch) | |
| tree | b2a99b5c4679328c341fa7edb6caafae7a772615 /compiler/rustc_mir_transform/src/coverage/query.rs | |
| parent | 86008eaeac3d6ac1403dccd17407a36b3aaec260 (diff) | |
| parent | ad962ed131aa3bfebc55b381bc93bae93667d3ee (diff) | |
| download | rust-88ed69c0359253643195a3f38540d8442f2c7c9e.tar.gz rust-88ed69c0359253643195a3f38540d8442f2c7c9e.zip | |
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,
}
}
```
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/query.rs')
0 files changed, 0 insertions, 0 deletions
