-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Make all methods of Duration
unstably const
#76335
Conversation
Thanks! I wanted do to that but got side tracked. |
Duration
constDuration
unstably const
☔ 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
Rebased onto master. |
📌 Commit 73e0a56 has been approved by |
…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
…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
…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
…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
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`
Make the following methods of
Duration
unstable const underduration_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 #76268.Possible because of #72449, which made the relevant
f32
andf64
methods const.Tracking issue: #72440
r? @ecstatic-morse