New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary issue for const-stabilizing `const_int_overflowing` #57237

Closed
Centril opened this Issue Dec 31, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@Centril
Copy link
Contributor

Centril commented Dec 31, 2018

In this issue, I propose that we turn methods gated by const_int_overflowing into const fns on stable. These methods include (for every primitive integer type, i.e. {u,i}{8,16,32,64,128,size}):

This proposal depends on #57175 as the above methods use let bindings.
Stabilization won't proceed until #57175 is stabilized.

Since the methods above are pure arithmetic there should be no reason not to eventually make these into const fns, and since we are gaining that ability, now is as good a time as any.

As with other constification proposals for primitive arithmetic (i.e. #57234 and #57105) I've included T-Lang since this affects intrinsics (add_with_overflow, sub_with_overflow, and mul_with_overflow) and the operational semantics of Rust's const fn fragment. This is the last in a series of constification proposals.


To avoid depending on 2 other PRs which will inevitably cause merge conflicts I've avoided creating another PR and will instead do so once FCP nears completion.

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Dec 31, 2018

@rfcbot merge

@rfcbot

This comment has been minimized.

Copy link

rfcbot commented Dec 31, 2018

Team member @Centril has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot

This comment has been minimized.

Copy link

rfcbot commented Jan 8, 2019

🔔 This is now entering its final comment period, as per the review above. 🔔

bors added a commit that referenced this issue Jan 13, 2019

Auto merge of #57566 - Centril:const-stabilize-overflowing, r=alexreg
Const-stabilize `const_int_overflowing`

Fixes #57237.

r? @alexreg

bors added a commit that referenced this issue Jan 13, 2019

Auto merge of #57566 - Centril:const-stabilize-overflowing, r=alexreg
Const-stabilize `const_int_overflowing`

Fixes #57237.

r? @alexreg

bors added a commit that referenced this issue Jan 13, 2019

Auto merge of #57566 - Centril:const-stabilize-overflowing, r=alexreg
Const-stabilize `const_int_overflowing`

Fixes #57237.

r? @alexreg

bors added a commit that referenced this issue Jan 13, 2019

Auto merge of #57566 - Centril:const-stabilize-overflowing, r=alexreg
Const-stabilize `const_int_overflowing`

Fixes #57237.

r? @alexreg

@bors bors closed this in #57566 Jan 13, 2019

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