View all comments
Feature gate: #![feature(exact_div)]
This is a tracking issue for exact division methods (i.e. for division without remainder) on primitive integer types.
Public API
/// Checked integer division without remainder. Computes `self / rhs`,
/// returning `None` if `rhs == 0` or if division remainder is not zero.
pub const fn checked_exact_div(self, rhs: Self) -> Option<Self> { ... }
/// Integer division without remainder. Computes `self / rhs`,
/// panics if `rhs == 0` or if division remainder is not zero.
pub const fn exact_div(self, rhs: Self) -> Self { ... }
/// Integer division without remainder.
/// Unchecked version of `exact_div`.
pub unsafe const fn unchecked_exact_div(self, rhs: Self) -> Self { ... }
Steps / History
Unresolved Questions
View all comments
Feature gate:
#![feature(exact_div)]This is a tracking issue for exact division methods (i.e. for division without remainder) on primitive integer types.
Public API
Steps / History
((un)checked_)exact_divmethods for integer types libs-team#337Unresolved Questions
exact_div: Add((un)checked_)exact_divmethods for integer types libs-team#337 (comment)