-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
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.
Description
Feature gate: #![feature(int_roundings)]
This is a tracking issue for the div_floor
, div_ceil
, next_multiple_of
, and checked_multiple_of
methods on all integer types.
Public API
impl {integer} {
#[unstable]
pub const fn div_floor(self, rhs: Self) -> Self;
}
impl {signed integer} {
#[unstable]
pub const fn div_ceil(self, rhs: Self) -> Self;
#[unstable]
pub const fn next_multiple_of(self, rhs: Self) -> Self;
#[unstable]
pub const fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>;
}
impl {unsigned integer} {
#[stable(since = "1.73.0")]
pub const fn div_ceil(self, rhs: Self) -> Self;
#[stable(since = "1.73.0")]
pub const fn next_multiple_of(self, rhs: Self) -> Self;
#[stable(since = "1.73.0")]
pub const fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>;
}
Steps / History
- Implement int_roundings (div_floor, div_ceil, next_multiple_of, checked_next_multiple_of) #88582
- regression: int_roundings conflicts with existing APIs #88971
- Temporarily rename int_roundings functions to avoid conflicts #89184
- Try all stable method candidates first before trying unstable ones #90329
- Revert "Temporarily rename int_roundings functions to avoid conflicts" #91141
- Update
int_roundings
methods from feedback #95359 - Partially stabilize
int_roundings
#94455
Unresolved Questions
- None yet.
EFanZh, MamontovAndrey, Nereuxofficial, kevincox, SadiinsoSnowfall and 113 morejorendorff, twe4ked, MrMino, avl, Vivi-17 and 8 moreRudxain, NotNorom, brooksprumo, markus-k, mimoo and 10 morefrjnn, jschwe, alexander-beedie, nathanielsimard, ahirner and 2 more
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
Projects
Milestone
Relationships
Development
Select code repository
Activity
Rollup merge of rust-lang#88582 - jhpratt:int_roundings, r=joshtriplett
Auto merge of rust-lang#88596 - m-ou-se:rollup-cidzt4v, r=m-ou-se
fourbytes commentedon Sep 3, 2021
Just updated to the latest nightly, looks like this feature breaks the num-bigint crate.
error[E0658]: use of unstable library feature 'int_roundings'
jhpratt commentedon Sep 3, 2021
That is considered acceptable breakage. Per RFC 1105, adding an inherent impl is a minor change.
int_roundings
feature) rust-num/num-bigint#218rust: use explicitily Integer::div_ceil
rust: use explicitily Integer::div_ceil
264 remaining items