mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 10:07:30 +00:00
23c03e4994
`transmute.stderr` file line count exceeded due to the new test cases so moving the new test cases into a separate file.
41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
error: transmute from a `f32` to a `u32`
|
|
--> $DIR/transmute_float_to_int.rs:4:27
|
|
|
|
|
LL | let _: u32 = unsafe { std::mem::transmute(1f32) };
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1f32.to_bits()`
|
|
|
|
|
= note: `-D clippy::transmute-float-to-int` implied by `-D warnings`
|
|
|
|
error: transmute from a `f32` to a `i32`
|
|
--> $DIR/transmute_float_to_int.rs:5:27
|
|
|
|
|
LL | let _: i32 = unsafe { std::mem::transmute(1f32) };
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1f32.to_bits() as i32`
|
|
|
|
error: transmute from a `f64` to a `u64`
|
|
--> $DIR/transmute_float_to_int.rs:6:27
|
|
|
|
|
LL | let _: u64 = unsafe { std::mem::transmute(1f64) };
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1f64.to_bits()`
|
|
|
|
error: transmute from a `f64` to a `i64`
|
|
--> $DIR/transmute_float_to_int.rs:7:27
|
|
|
|
|
LL | let _: i64 = unsafe { std::mem::transmute(1f64) };
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1f64.to_bits() as i64`
|
|
|
|
error: transmute from a `f64` to a `u64`
|
|
--> $DIR/transmute_float_to_int.rs:8:27
|
|
|
|
|
LL | let _: u64 = unsafe { std::mem::transmute(1.0) };
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1.0f64.to_bits()`
|
|
|
|
error: transmute from a `f64` to a `u64`
|
|
--> $DIR/transmute_float_to_int.rs:9:27
|
|
|
|
|
LL | let _: u64 = unsafe { std::mem::transmute(-1.0) };
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(-1.0f64).to_bits()`
|
|
|
|
error: aborting due to 6 previous errors
|
|
|