Commit e092556
authored
Rollup merge of rust-lang#137383 - folkertdev:stabilize-unsigned-is-multiple-of, r=Noratrieb
stabilize `unsigned_is_multiple_of`
tracking issue: rust-lang#128101
fcp completed in: rust-lang#128101 (comment)
### 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,
}
}
```File tree
3 files changed
+2
-4
lines changed- library
- coretests/tests
- core/src/num
- src/tools/miri/src
3 files changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3320 | 3320 | | |
3321 | 3321 | | |
3322 | 3322 | | |
3323 | | - | |
3324 | 3323 | | |
3325 | 3324 | | |
3326 | 3325 | | |
3327 | 3326 | | |
3328 | 3327 | | |
3329 | 3328 | | |
3330 | | - | |
| 3329 | + | |
| 3330 | + | |
3331 | 3331 | | |
3332 | 3332 | | |
3333 | 3333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
0 commit comments