Skip to content

Summary issue for const-stabilizing const_int_overflowing #57237

Description

@Centril

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.

Activity

  1. added
    T-langRelevant to the language team
    T-libs-api[DEPRECATED; DO NOT USE]
    on Dec 31, 2018
  2. Centril commented on Dec 31, 2018

    @Centril
    ContributorAuthor

    @rfcbot merge

  3. rfcbot commented on Dec 31, 2018

    @rfcbot

    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.

  4. added
    proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
    disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.
    on Dec 31, 2018
  5. added
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    and removed
    proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
    on Jan 8, 2019
  6. rfcbot commented on Jan 8, 2019

    @rfcbot

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

  7. added and removed
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    on Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language teamT-libs-api[DEPRECATED; DO NOT USE]disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions