forked from rust-lang/rust-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit c15d8ca
authored
Rollup merge of #129555 - RalfJung:const_float_bits_conv, r=dtolnay
stabilize const_float_bits_conv
This stabilizes `const_float_bits_conv`, and thus fixes rust-lang/rust#72447. With rust-lang/rust#128596 having landed, this is entirely a libs-only question now.
```rust
impl f32 {
pub const fn to_bits(self) -> u32;
pub const fn from_bits(v: u32) -> Self;
pub const fn to_be_bytes(self) -> [u8; 4];
pub const fn to_le_bytes(self) -> [u8; 4]
pub const fn to_ne_bytes(self) -> [u8; 4];
pub const fn from_be_bytes(bytes: [u8; 4]) -> Self;
pub const fn from_le_bytes(bytes: [u8; 4]) -> Self;
pub const fn from_ne_bytes(bytes: [u8; 4]) -> Self;
}
impl f64 {
pub const fn to_bits(self) -> u64;
pub const fn from_bits(v: u64) -> Self;
pub const fn to_be_bytes(self) -> [u8; 8];
pub const fn to_le_bytes(self) -> [u8; 8]
pub const fn to_ne_bytes(self) -> [u8; 8];
pub const fn from_be_bytes(bytes: [u8; 8]) -> Self;
pub const fn from_le_bytes(bytes: [u8; 8]) -> Self;
pub const fn from_ne_bytes(bytes: [u8; 8]) -> Self;
}
````
Cc `@rust-lang/wg-const-eval` `@rust-lang/libs-api`File tree
0 file changed
+0
-0
lines changedFilter options
0 file changed
+0
-0
lines changed
0 commit comments