Skip to content
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 · Fixed by #57566
Closed

Summary issue for const-stabilizing const_int_overflowing #57237

Centril opened this issue Dec 31, 2018 · 3 comments · Fixed by #57566
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@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 Centril added T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Dec 31, 2018
@Centril
Copy link
Contributor Author

Centril commented Dec 31, 2018

@rfcbot merge

@rfcbot
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 rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Dec 31, 2018
@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Jan 8, 2019
@rfcbot
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
Const-stabilize `const_int_overflowing`

Fixes #57237.

r? @alexreg
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants