]> git.lizzy.rs Git - rust.git/blob - tests/ui/cast_size.stderr
Merge remote-tracking branch 'upstream/master' into prs
[rust.git] / tests / ui / cast_size.stderr
1 error: casting isize to i8 may truncate the value
2  --> $DIR/cast_size.rs:7:5
3   |
4 7 |     1isize as i8;
5   |     ^^^^^^^^^^^^
6   |
7   = note: `-D clippy::cast-possible-truncation` implied by `-D warnings`
8
9 error: 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.rs:8:5
11   |
12 8 |     1isize as f64;
13   |     ^^^^^^^^^^^^^
14   |
15   = note: `-D clippy::cast-precision-loss` implied by `-D warnings`
16
17 error: 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.rs:9:5
19   |
20 9 |     1usize as f64;
21   |     ^^^^^^^^^^^^^
22
23 error: 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.rs:10:5
25    |
26 10 |     1isize as f32;
27    |     ^^^^^^^^^^^^^
28
29 error: 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.rs:11:5
31    |
32 11 |     1usize as f32;
33    |     ^^^^^^^^^^^^^
34
35 error: casting isize to i32 may truncate the value on targets with 64-bit wide pointers
36   --> $DIR/cast_size.rs:12:5
37    |
38 12 |     1isize as i32;
39    |     ^^^^^^^^^^^^^
40
41 error: casting isize to u32 may lose the sign of the value
42   --> $DIR/cast_size.rs:13:5
43    |
44 13 |     1isize as u32;
45    |     ^^^^^^^^^^^^^
46    |
47    = note: `-D clippy::cast-sign-loss` implied by `-D warnings`
48
49 error: casting isize to u32 may truncate the value on targets with 64-bit wide pointers
50   --> $DIR/cast_size.rs:13:5
51    |
52 13 |     1isize as u32;
53    |     ^^^^^^^^^^^^^
54
55 error: casting usize to u32 may truncate the value on targets with 64-bit wide pointers
56   --> $DIR/cast_size.rs:14:5
57    |
58 14 |     1usize as u32;
59    |     ^^^^^^^^^^^^^
60
61 error: casting usize to i32 may truncate the value on targets with 64-bit wide pointers
62   --> $DIR/cast_size.rs:15:5
63    |
64 15 |     1usize as i32;
65    |     ^^^^^^^^^^^^^
66
67 error: casting usize to i32 may wrap around the value on targets with 32-bit wide pointers
68   --> $DIR/cast_size.rs:15:5
69    |
70 15 |     1usize as i32;
71    |     ^^^^^^^^^^^^^
72    |
73    = note: `-D clippy::cast-possible-wrap` implied by `-D warnings`
74
75 error: casting i64 to isize may truncate the value on targets with 32-bit wide pointers
76   --> $DIR/cast_size.rs:17:5
77    |
78 17 |     1i64 as isize;
79    |     ^^^^^^^^^^^^^
80
81 error: casting i64 to usize may lose the sign of the value
82   --> $DIR/cast_size.rs:18:5
83    |
84 18 |     1i64 as usize;
85    |     ^^^^^^^^^^^^^
86
87 error: casting i64 to usize may truncate the value on targets with 32-bit wide pointers
88   --> $DIR/cast_size.rs:18:5
89    |
90 18 |     1i64 as usize;
91    |     ^^^^^^^^^^^^^
92
93 error: casting u64 to isize may truncate the value on targets with 32-bit wide pointers
94   --> $DIR/cast_size.rs:19:5
95    |
96 19 |     1u64 as isize;
97    |     ^^^^^^^^^^^^^
98
99 error: casting u64 to isize may wrap around the value on targets with 64-bit wide pointers
100   --> $DIR/cast_size.rs:19:5
101    |
102 19 |     1u64 as isize;
103    |     ^^^^^^^^^^^^^
104
105 error: casting u64 to usize may truncate the value on targets with 32-bit wide pointers
106   --> $DIR/cast_size.rs:20:5
107    |
108 20 |     1u64 as usize;
109    |     ^^^^^^^^^^^^^
110
111 error: casting u32 to isize may wrap around the value on targets with 32-bit wide pointers
112   --> $DIR/cast_size.rs:21:5
113    |
114 21 |     1u32 as isize;
115    |     ^^^^^^^^^^^^^
116
117 error: casting i32 to usize may lose the sign of the value
118   --> $DIR/cast_size.rs:24:5
119    |
120 24 |     1i32 as usize;
121    |     ^^^^^^^^^^^^^
122
123 error: aborting due to 19 previous errors
124