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

Makes the constructors of Duration const fns. #47300

Merged
merged 3 commits into from Jan 24, 2018

Conversation

Projects
None yet
@remexre
Contributor

remexre commented Jan 9, 2018

This affects Duration::new, Duration::from_secs, Duration::from_millis, Duration::from_micros, and Duration::from_nanos.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Jan 9, 2018

Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aidanhs (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Collaborator

rust-highfive commented Jan 9, 2018

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aidanhs (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@remexre remexre referenced this pull request Jan 9, 2018

Open

const fn tracking issue (RFC 911) #24111

1 of 4 tasks complete
Show outdated Hide outdated src/libstd/time/duration.rs Outdated
@oli-obk

This comment has been minimized.

Show comment
Hide comment
@oli-obk

oli-obk Jan 9, 2018

Contributor

It's not possible to have local variables in const fn yet. You'd need to convert everything to expression syntax.

Contributor

oli-obk commented Jan 9, 2018

It's not possible to have local variables in const fn yet. You'd need to convert everything to expression syntax.

@remexre

This comment has been minimized.

Show comment
Hide comment
@remexre

remexre Jan 9, 2018

Contributor

Yeah, I committed the sin of PR'ing before the tests finished running locally... Should be fixed now?

Contributor

remexre commented Jan 9, 2018

Yeah, I committed the sin of PR'ing before the tests finished running locally... Should be fixed now?

Show outdated Hide outdated src/libstd/time/duration.rs Outdated
@Mark-Simulacrum

This comment has been minimized.

Show comment
Hide comment
@Mark-Simulacrum
Member

Mark-Simulacrum commented Jan 10, 2018

@Mark-Simulacrum Mark-Simulacrum assigned sfackler and unassigned aidanhs Jan 10, 2018

@sfackler

This comment has been minimized.

Show comment
Hide comment
@sfackler

sfackler Jan 10, 2018

Member

These seem reasonable to me to become const fns.

@rfcbot fcp merge

Member

sfackler commented Jan 10, 2018

These seem reasonable to me to become const fns.

@rfcbot fcp merge

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Jan 10, 2018

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

No concerns currently listed.

Once these reviewers reach consensus, 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 commented Jan 10, 2018

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

No concerns currently listed.

Once these reviewers reach consensus, 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.

@kennytm

This comment has been minimized.

Show comment
Hide comment
@kennytm

kennytm Jan 17, 2018

Member

Triage ping, ticky boxes for you! @BurntSushi @Kimundi

Member

kennytm commented Jan 17, 2018

Triage ping, ticky boxes for you! @BurntSushi @Kimundi

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Jan 23, 2018

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

rfcbot commented Jan 23, 2018

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

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Jan 23, 2018

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

rfcbot commented Jan 23, 2018

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

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton
Member

alexcrichton commented Jan 23, 2018

@bors: r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jan 23, 2018

Contributor

📌 Commit c25178c has been approved by alexcrichton

Contributor

bors commented Jan 23, 2018

📌 Commit c25178c has been approved by alexcrichton

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jan 24, 2018

Contributor

⌛️ Testing commit c25178c with merge a0dcecf...

Contributor

bors commented Jan 24, 2018

⌛️ Testing commit c25178c with merge a0dcecf...

bors added a commit that referenced this pull request Jan 24, 2018

Auto merge of #47300 - remexre:duration-constructors-as-const-fns, r=…
…alexcrichton

Makes the constructors of Duration const fns.

This affects `Duration::new`, `Duration::from_secs`, `Duration::from_millis`, `Duration::from_micros`, and `Duration::from_nanos`.
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jan 24, 2018

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing a0dcecf to master...

Contributor

bors commented Jan 24, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing a0dcecf to master...

@bors bors merged commit c25178c into rust-lang:master Jan 24, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment