Tracking Issue for int_roundings
· Issue #88581 · rust-lang/rust (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
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.