diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-07-28 20:07:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-28 20:07:45 +0200 |
| commit | 0e45047e81603f0b9d666dcc74d4f8915fea31cc (patch) | |
| tree | 3bb5d5e95e3c7086ed72e7d8a9e1c50f5e351930 /compiler/rustc_mir_transform/src/errors.rs | |
| parent | 19feb90d69ff05979561f8329a99bc1f1e1f6508 (diff) | |
| parent | aded725d6b955e5b24bda4b985996667fe9dc16f (diff) | |
| download | rust-0e45047e81603f0b9d666dcc74d4f8915fea31cc.tar.gz rust-0e45047e81603f0b9d666dcc74d4f8915fea31cc.zip | |
Rollup merge of #128103 - folkertdev:unsigned-int-is-multiple-of, r=Amanieu
add `is_multiple_of` for unsigned integer types tracking issue: https://github.com/rust-lang/rust/issues/128101 This adds the `.is_multiple_of` method on unsigned integers. Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise. This function is equivalent to `self % rhs == 0`, except that it will not panic for `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`, `n.is_multiple_of(0) == false`.
Diffstat (limited to 'compiler/rustc_mir_transform/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
