Skip to content

Add rem_floor and rem_ceil#158271

Open
orlp wants to merge 4 commits into
rust-lang:mainfrom
orlp:rem-floor-ceil
Open

Add rem_floor and rem_ceil#158271
orlp wants to merge 4 commits into
rust-lang:mainfrom
orlp:rem-floor-ceil

Conversation

@orlp

@orlp orlp commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This adds the rem_floor (for all signed and unsigned integers) and rem_ceil (for all signed integers) methods. I found these to be missing from the int_roundings feature. I don't think we should ship div functions without a corresponding rem.

The exception is that there is no rem_ceil for unsigned integers, as it would always return a negative result when non-zero.

r? @jhpratt

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 22, 2026
@rust-log-analyzer

This comment has been minimized.

@jhpratt jhpratt added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Jun 24, 2026
@jhpratt

jhpratt commented Jun 24, 2026

Copy link
Copy Markdown
Member

Nominating for team discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I-libs-api-nominated Nominated for discussion during a libs-api team meeting. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants