10

Partially stabilize `duration_consts_2` by jhpratt · Pull Request #89542 · rust-...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/89542
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Copy link

Contributor

jhpratt commented 17 days ago

Methods that were only blocked on const_panic have been stabilized.
The remaining methods of duration_consts_2 are all related to floats,
and as such have been placed behind the duration_consts_float feature
gate.

Copy link

Collaborator

rust-highfive commented 17 days ago

r? @dtolnay

(rust-highfive has picked a reviewer for you, use r? to override)

This comment has been hidden.

This comment has been hidden.

Copy link

Member

dtolnay commented 16 days ago

Stabilize the following methods as const:

impl Duration {
    pub const fn new(secs: u64, nanos: u32) -> Duration;
    pub const fn checked_add(self, rhs: Duration) -> Option<Duration>;
    pub const fn saturating_add(self, rhs: Duration) -> Duration;
    pub const fn checked_sub(self, rhs: Duration) -> Option<Duration>;
    pub const fn saturating_sub(self, rhs: Duration) -> Duration;
    pub const fn checked_mul(self, rhs: u32) -> Option<Duration>;
    pub const fn saturating_mul(self, rhs: u32) -> Duration;
    pub const fn checked_div(self, rhs: u32) -> Option<Duration>;
}

All of these are stable signatures already, but this PR is making them stably callable in const.

@rust-lang/libs-api
@rfcbot fcp merge

Copy link

rfcbot commented 16 days ago

edited by Amanieu

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

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), 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.

Copy link

rfcbot commented 14 days ago

bellThis is now entering its final comment period, as per the review above. bell

Copy link

Contributor

bors commented 10 days ago

umbrella The latest upstream changes (presumably #89767) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link

rfcbot commented 4 days ago

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

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

Reviewers

No reviews

Assignees

dtolnay

Projects

None yet

Milestone

No milestone

Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK