Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork14.5k
Open
Description
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.pubconstfnchecked_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.pubconstfnexact_div(self,rhs:Self) ->Self{ ...}/// Integer division without remainder./// Unchecked version of `exact_div`.pubunsafeconstfnunchecked_exact_div(self,rhs:Self) ->Self{ ...}
Steps / History
- ACP:Add
((un)checked_)exact_divmethods for integer types libs-team#337 - Implementation: TODO
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Concerns over usefulness of the panicking
exact_div:Add((un)checked_)exact_divmethods for integer types libs-team#337 (comment)