We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 803cbaf commit 9f39427Copy full SHA for 9f39427
tests/ui/consts/const-float-bits-conv.rs
@@ -29,6 +29,7 @@ fn has_broken_floats() -> bool {
29
std::env::var("TARGET").is_ok_and(|v| v.contains("i586"))
30
}
31
32
+#[cfg(target_arch = "x86_64")]
33
fn f16(){
34
const_assert!((1f16).to_bits(), 0x3c00);
35
const_assert!(u16::from_be_bytes(1f16.to_be_bytes()), 0x3c00);
@@ -119,6 +120,7 @@ fn f64() {
119
120
121
122
123
124
fn f128() {
125
const_assert!((1f128).to_bits(), 0x3fff0000000000000000000000000000);
126
const_assert!(u128::from_be_bytes(1f128.to_be_bytes()), 0x3fff0000000000000000000000000000);
@@ -150,8 +152,11 @@ fn f128() {
150
152
151
153
154
fn main() {
- f16();
155
+ #[cfg(target_arch = "x86_64")]
156
+ {
157
+ f16();
158
+ f128();
159
+ }
160
f32();
161
f64();
- f128();
162
0 commit comments