Tracking Issue for unsigned_is_multiple_of
#128101
Labels
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Feature gate:
#![feature(unsigned_is_multiple_of)]
ACP: rust-lang/libs-team#404
This is a tracking issue for the
.is_multiple_of
method on unsigned integers.Returns
true
ifself
is an integer multiple ofrhs
, and false otherwise.This function is equivalent to
self % rhs == 0
, except that it will not panic forrhs == 0
. Instead,0.is_multiple_of(0) == true
, and for any non-zeron
,n.is_multiple_of(0) == false
.If you have a real usecase for this function on signed integer types, let us know! That was not included for simplicity, but if a usecase comes up, adding it will be considered.
Public API
A version of this for all the unsigned types
Steps / History
is_multiple_of
for unsigned integer types #128103Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: