Tracking Issue for `exact_div`
Open
Nobody has claimed this yet.
C-tracking-issue
S-tracking-unimplemented
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
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.
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
- ACP: https://github.com/rust-lang/libs-team/issues/337
- Implementation: TODO
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Concerns over usefulness of the panicking
exact_div: https://github.com/rust-lang/libs-team/issues/337#issuecomment-2799431533
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the #![feature(exact_div)] entry point and the public API definitions for checked_exact_div, exact_div, and unchecked_exact_div. Read the ACP in libs-team issue 337, including the unresolved concern about the panicking method, before deciding the implementation scope. Done requires implementation, a final comment period, and a stabilization PR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100