]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/transmute_float_to_int.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / transmute_float_to_int.stderr
CommitLineData
f20569fa 1error: transmute from a `f32` to a `u32`
94222f64 2 --> $DIR/transmute_float_to_int.rs:4:27
f20569fa
XL
3 |
4LL | let _: u32 = unsafe { std::mem::transmute(1f32) };
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1f32.to_bits()`
6 |
7 = note: `-D clippy::transmute-float-to-int` implied by `-D warnings`
781aab86 8 = help: to override `-D warnings` add `#[allow(clippy::transmute_float_to_int)]`
f20569fa
XL
9
10error: transmute from a `f32` to a `i32`
781aab86 11 --> $DIR/transmute_float_to_int.rs:7:27
f20569fa
XL
12 |
13LL | let _: i32 = unsafe { std::mem::transmute(1f32) };
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1f32.to_bits() as i32`
15
16error: transmute from a `f64` to a `u64`
781aab86 17 --> $DIR/transmute_float_to_int.rs:9:27
f20569fa
XL
18 |
19LL | let _: u64 = unsafe { std::mem::transmute(1f64) };
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1f64.to_bits()`
21
22error: transmute from a `f64` to a `i64`
781aab86 23 --> $DIR/transmute_float_to_int.rs:11:27
f20569fa
XL
24 |
25LL | let _: i64 = unsafe { std::mem::transmute(1f64) };
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1f64.to_bits() as i64`
27
28error: transmute from a `f64` to a `u64`
781aab86 29 --> $DIR/transmute_float_to_int.rs:13:27
f20569fa
XL
30 |
31LL | let _: u64 = unsafe { std::mem::transmute(1.0) };
32 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1.0f64.to_bits()`
33
34error: transmute from a `f64` to a `u64`
781aab86 35 --> $DIR/transmute_float_to_int.rs:15:27
f20569fa
XL
36 |
37LL | let _: u64 = unsafe { std::mem::transmute(-1.0) };
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(-1.0f64).to_bits()`
39
40error: aborting due to 6 previous errors
41