-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for unsigned_is_multiple_of #128101
Copy link
Copy link
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Milestone
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(unsigned_is_multiple_of)]ACP: rust-lang/libs-team#404
This is a tracking issue for the
.is_multiple_ofmethod on unsigned integers.Returns
trueifselfis 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_offor unsigned integer types #128103unsigned_is_multiple_of#137383Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩