]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/cast_size_32bit.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / cast_size_32bit.stderr
CommitLineData
f20569fa
XL
1error: casting `isize` to `i8` may truncate the value
2 --> $DIR/cast_size_32bit.rs:12:5
3 |
4LL | 1isize as i8;
5 | ^^^^^^^^^^^^
6 |
7 = note: `-D clippy::cast-possible-truncation` implied by `-D warnings`
8
9error: casting `isize` to `f64` causes a loss of precision on targets with 64-bit wide pointers (`isize` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
10 --> $DIR/cast_size_32bit.rs:15:5
11 |
12LL | x0 as f64;
13 | ^^^^^^^^^
14 |
15 = note: `-D clippy::cast-precision-loss` implied by `-D warnings`
16
f20569fa
XL
17error: casting `usize` to `f64` causes a loss of precision on targets with 64-bit wide pointers (`usize` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
18 --> $DIR/cast_size_32bit.rs:16:5
19 |
20LL | x1 as f64;
21 | ^^^^^^^^^
22
f20569fa
XL
23error: casting `isize` to `f32` causes a loss of precision (`isize` is 32 or 64 bits wide, but `f32`'s mantissa is only 23 bits wide)
24 --> $DIR/cast_size_32bit.rs:17:5
25 |
26LL | x0 as f32;
27 | ^^^^^^^^^
28
29error: casting `usize` to `f32` causes a loss of precision (`usize` is 32 or 64 bits wide, but `f32`'s mantissa is only 23 bits wide)
30 --> $DIR/cast_size_32bit.rs:18:5
31 |
32LL | x1 as f32;
33 | ^^^^^^^^^
34
35error: casting `isize` to `i32` may truncate the value on targets with 64-bit wide pointers
36 --> $DIR/cast_size_32bit.rs:19:5
37 |
38LL | 1isize as i32;
39 | ^^^^^^^^^^^^^
40
41error: casting `isize` to `u32` may truncate the value on targets with 64-bit wide pointers
42 --> $DIR/cast_size_32bit.rs:20:5
43 |
44LL | 1isize as u32;
45 | ^^^^^^^^^^^^^
46
47error: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
48 --> $DIR/cast_size_32bit.rs:21:5
49 |
50LL | 1usize as u32;
51 | ^^^^^^^^^^^^^
52
53error: casting `usize` to `i32` may truncate the value on targets with 64-bit wide pointers
54 --> $DIR/cast_size_32bit.rs:22:5
55 |
56LL | 1usize as i32;
57 | ^^^^^^^^^^^^^
58
59error: casting `usize` to `i32` may wrap around the value on targets with 32-bit wide pointers
60 --> $DIR/cast_size_32bit.rs:22:5
61 |
62LL | 1usize as i32;
63 | ^^^^^^^^^^^^^
64 |
65 = note: `-D clippy::cast-possible-wrap` implied by `-D warnings`
66
67error: casting `i64` to `isize` may truncate the value on targets with 32-bit wide pointers
68 --> $DIR/cast_size_32bit.rs:24:5
69 |
70LL | 1i64 as isize;
71 | ^^^^^^^^^^^^^
72
73error: casting `i64` to `usize` may truncate the value on targets with 32-bit wide pointers
74 --> $DIR/cast_size_32bit.rs:25:5
75 |
76LL | 1i64 as usize;
77 | ^^^^^^^^^^^^^
78
79error: casting `u64` to `isize` may truncate the value on targets with 32-bit wide pointers
80 --> $DIR/cast_size_32bit.rs:26:5
81 |
82LL | 1u64 as isize;
83 | ^^^^^^^^^^^^^
84
85error: casting `u64` to `isize` may wrap around the value on targets with 64-bit wide pointers
86 --> $DIR/cast_size_32bit.rs:26:5
87 |
88LL | 1u64 as isize;
89 | ^^^^^^^^^^^^^
90
91error: casting `u64` to `usize` may truncate the value on targets with 32-bit wide pointers
92 --> $DIR/cast_size_32bit.rs:27:5
93 |
94LL | 1u64 as usize;
95 | ^^^^^^^^^^^^^
96
97error: casting `u32` to `isize` may wrap around the value on targets with 32-bit wide pointers
98 --> $DIR/cast_size_32bit.rs:28:5
99 |
100LL | 1u32 as isize;
101 | ^^^^^^^^^^^^^
102
103error: casting `i32` to `f32` causes a loss of precision (`i32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide)
104 --> $DIR/cast_size_32bit.rs:33:5
105 |
106LL | 999_999_999 as f32;
107 | ^^^^^^^^^^^^^^^^^^
108
109error: casting integer literal to `f64` is unnecessary
110 --> $DIR/cast_size_32bit.rs:34:5
111 |
112LL | 3_999_999_999usize as f64;
113 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `3_999_999_999_f64`
114 |
115 = note: `-D clippy::unnecessary-cast` implied by `-D warnings`
116
117error: aborting due to 20 previous errors
118