Make all methods of Duration unstably const#76335
Merged
bors merged 1 commit intorust-lang:masterfrom Sep 16, 2020
Merged
Conversation
Contributor
|
Thanks! I wanted do to that but got side tracked. |
Duration constDuration unstably const
Collaborator
|
☔ The latest upstream changes (presumably #76637) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels: |
Make the following methods of `Duration` unstable const under `duration_const_2`: - `from_secs_f64` - `from_secs_f32` - `mul_f64` - `mul_f32` - `div_f64` - `div_f32` This results in all methods of `Duration` being (unstable) const. Also adds tests for these methods in a const context, moved the test to `library` as part of rust-lang#76268. Possible because of rust-lang#72449, which made the relevant `f32` and `f64` methods const. Tracking issue: rust-lang#72440
0800da8 to
73e0a56
Compare
Contributor
Author
|
Rebased onto master. |
Contributor
Collaborator
|
📌 Commit 73e0a56 has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Sep 12, 2020
…orse Make all methods of `Duration` unstably const Make the following methods of `Duration` unstable const under `duration_const_2`: - `from_secs_f64` - `from_secs_f32` - `mul_f64` - `mul_f32` - `div_f64` - `div_f32` This results in all methods of `Duration` being (unstable) const. Moved the tests to `library` as part of rust-lang#76268. Possible because of rust-lang#72449, which made the relevant `f32` and `f64` methods const. Tracking issue: rust-lang#72440 r? @ecstatic-morse
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Sep 13, 2020
…orse Make all methods of `Duration` unstably const Make the following methods of `Duration` unstable const under `duration_const_2`: - `from_secs_f64` - `from_secs_f32` - `mul_f64` - `mul_f32` - `div_f64` - `div_f32` This results in all methods of `Duration` being (unstable) const. Moved the tests to `library` as part of rust-lang#76268. Possible because of rust-lang#72449, which made the relevant `f32` and `f64` methods const. Tracking issue: rust-lang#72440 r? @ecstatic-morse
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Sep 13, 2020
…orse Make all methods of `Duration` unstably const Make the following methods of `Duration` unstable const under `duration_const_2`: - `from_secs_f64` - `from_secs_f32` - `mul_f64` - `mul_f32` - `div_f64` - `div_f32` This results in all methods of `Duration` being (unstable) const. Moved the tests to `library` as part of rust-lang#76268. Possible because of rust-lang#72449, which made the relevant `f32` and `f64` methods const. Tracking issue: rust-lang#72440 r? @ecstatic-morse
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Sep 16, 2020
…orse Make all methods of `Duration` unstably const Make the following methods of `Duration` unstable const under `duration_const_2`: - `from_secs_f64` - `from_secs_f32` - `mul_f64` - `mul_f32` - `div_f64` - `div_f32` This results in all methods of `Duration` being (unstable) const. Moved the tests to `library` as part of rust-lang#76268. Possible because of rust-lang#72449, which made the relevant `f32` and `f64` methods const. Tracking issue: rust-lang#72440 r? @ecstatic-morse
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 16, 2020
Rollup of 10 pull requests Successful merges: - rust-lang#76056 (Add more info for Vec Drain doc) - rust-lang#76062 (Vec slice example fix style and show type elision) - rust-lang#76262 (Use inline(never) instead of cold) - rust-lang#76335 (Make all methods of `Duration` unstably const) - rust-lang#76366 (Add Arith Tests in Library) - rust-lang#76369 (Move Various str tests in library) - rust-lang#76534 (Add doc comments for From impls) - rust-lang#76622 (Update bootstrap readme) - rust-lang#76641 (Some cleanup changes and commenting) - rust-lang#76662 (Fix liballoc test suite for Miri) Failed merges: r? `@ghost`
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the following methods of
Durationunstable const underduration_const_2:from_secs_f64from_secs_f32mul_f64mul_f32div_f64div_f32This results in all methods of
Durationbeing (unstable) const.Moved the tests to
libraryas part of #76268.Possible because of #72449, which made the relevant
f32andf64methods const.Tracking issue: #72440
r? @ecstatic-morse