-
Notifications
You must be signed in to change notification settings - Fork 14k
Const floating point bitcasts and classification #72449
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
Conversation
711e244 to
c3bb670
Compare
|
LGTM, but I'd also like to know what @oli-obk thinks. |
|
Would it make sense to also add Asking for #72440. |
Sure. |
c3bb670 to
5f9c391
Compare
5f9c391 to
8de4f06
Compare
This comment has been minimized.
This comment has been minimized.
8de4f06 to
9dadeb3
Compare
|
lgtm. Stabilizing these will be blocked on stabilizing floating point types in const fn. |
|
Going through old PRs today. Is there still desire for this? I'll close if not. |
|
Sorry, I had no idea this was waiting for my review. @Elinvynia a ping would have helped. :) |
|
Unfortunately, we aren't allowed to ping team members. |
|
@bors r=RalfJung,oli-obk |
|
📌 Commit 9dadeb3 has been approved by |
… r=RalfJung,oli-obk Const floating point bitcasts and classification Makes the `f32` and `f64` methods described in rust-lang#72447 and rust-lang#72505 unstably const. r? @RalfJung
|
@ecstatic-morse sorry for the long silence. Could you rebase and address my latest review? Then I think this can land. |
426ece4 to
d9a5637
Compare
d9a5637 to
b65daa7
Compare
|
This is ready to go now. I don't see a path to stabilization for these until we resolve the questions around determinism that are blocking floating point operations inside |
|
r=me with the test attributes fixed. |
Co-authored-by: Ralf Jung <post@ralfj.de>
|
@bors r+ |
|
📌 Commit 130766c has been approved by |
|
☀️ Test successful - checks-actions, checks-azure |
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
…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
…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
Makes the
f32andf64methods described in #72447 and #72505 unstably const.r? @RalfJung