fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.5 KiB71 linesraw
1error: casting `i8` to `f32` may become silently lossy if you later change the type
2  --> $DIR/cast_lossless_float.rs:7:13
3   |
4LL |     let _ = x0 as f32;
5   |             ^^^^^^^^^ help: try: `f32::from(x0)`
6   |
7   = note: `-D clippy::cast-lossless` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::cast_lossless)]`
9
10error: casting `i8` to `f64` may become silently lossy if you later change the type
11  --> $DIR/cast_lossless_float.rs:8:13
12   |
13LL |     let _ = x0 as f64;
14   |             ^^^^^^^^^ help: try: `f64::from(x0)`
15
16error: casting `u8` to `f32` may become silently lossy if you later change the type
17  --> $DIR/cast_lossless_float.rs:10:13
18   |
19LL |     let _ = x1 as f32;
20   |             ^^^^^^^^^ help: try: `f32::from(x1)`
21
22error: casting `u8` to `f64` may become silently lossy if you later change the type
23  --> $DIR/cast_lossless_float.rs:11:13
24   |
25LL |     let _ = x1 as f64;
26   |             ^^^^^^^^^ help: try: `f64::from(x1)`
27
28error: casting `i16` to `f32` may become silently lossy if you later change the type
29  --> $DIR/cast_lossless_float.rs:13:13
30   |
31LL |     let _ = x2 as f32;
32   |             ^^^^^^^^^ help: try: `f32::from(x2)`
33
34error: casting `i16` to `f64` may become silently lossy if you later change the type
35  --> $DIR/cast_lossless_float.rs:14:13
36   |
37LL |     let _ = x2 as f64;
38   |             ^^^^^^^^^ help: try: `f64::from(x2)`
39
40error: casting `u16` to `f32` may become silently lossy if you later change the type
41  --> $DIR/cast_lossless_float.rs:16:13
42   |
43LL |     let _ = x3 as f32;
44   |             ^^^^^^^^^ help: try: `f32::from(x3)`
45
46error: casting `u16` to `f64` may become silently lossy if you later change the type
47  --> $DIR/cast_lossless_float.rs:17:13
48   |
49LL |     let _ = x3 as f64;
50   |             ^^^^^^^^^ help: try: `f64::from(x3)`
51
52error: casting `i32` to `f64` may become silently lossy if you later change the type
53  --> $DIR/cast_lossless_float.rs:19:13
54   |
55LL |     let _ = x4 as f64;
56   |             ^^^^^^^^^ help: try: `f64::from(x4)`
57
58error: casting `u32` to `f64` may become silently lossy if you later change the type
59  --> $DIR/cast_lossless_float.rs:21:13
60   |
61LL |     let _ = x5 as f64;
62   |             ^^^^^^^^^ help: try: `f64::from(x5)`
63
64error: casting `f32` to `f64` may become silently lossy if you later change the type
65  --> $DIR/cast_lossless_float.rs:24:13
66   |
67LL |     let _ = 1.0f32 as f64;
68   |             ^^^^^^^^^^^^^ help: try: `f64::from(1.0f32)`
69
70error: aborting due to 11 previous errors
71