|
1 | 1 | error: casting i32 to f32 causes a loss of precision (i32 is 32 bits wide, but f32's mantissa is only 23 bits wide) |
2 | | - --> $DIR/cast.rs:12:5 |
| 2 | + --> $DIR/cast.rs:11:5 |
3 | 3 | | |
4 | 4 | LL | x0 as f32; |
5 | 5 | | ^^^^^^^^^ |
6 | 6 | | |
7 | 7 | = note: `-D clippy::cast-precision-loss` implied by `-D warnings` |
8 | 8 |
|
9 | 9 | error: casting i64 to f32 causes a loss of precision (i64 is 64 bits wide, but f32's mantissa is only 23 bits wide) |
10 | | - --> $DIR/cast.rs:14:5 |
| 10 | + --> $DIR/cast.rs:13:5 |
11 | 11 | | |
12 | 12 | LL | x1 as f32; |
13 | 13 | | ^^^^^^^^^ |
14 | 14 |
|
15 | 15 | error: casting i64 to f64 causes a loss of precision (i64 is 64 bits wide, but f64's mantissa is only 52 bits wide) |
16 | | - --> $DIR/cast.rs:15:5 |
| 16 | + --> $DIR/cast.rs:14:5 |
17 | 17 | | |
18 | 18 | LL | x1 as f64; |
19 | 19 | | ^^^^^^^^^ |
20 | 20 |
|
21 | 21 | error: casting u32 to f32 causes a loss of precision (u32 is 32 bits wide, but f32's mantissa is only 23 bits wide) |
22 | | - --> $DIR/cast.rs:17:5 |
| 22 | + --> $DIR/cast.rs:16:5 |
23 | 23 | | |
24 | 24 | LL | x2 as f32; |
25 | 25 | | ^^^^^^^^^ |
26 | 26 |
|
27 | 27 | error: casting u64 to f32 causes a loss of precision (u64 is 64 bits wide, but f32's mantissa is only 23 bits wide) |
28 | | - --> $DIR/cast.rs:19:5 |
| 28 | + --> $DIR/cast.rs:18:5 |
29 | 29 | | |
30 | 30 | LL | x3 as f32; |
31 | 31 | | ^^^^^^^^^ |
32 | 32 |
|
33 | 33 | error: casting u64 to f64 causes a loss of precision (u64 is 64 bits wide, but f64's mantissa is only 52 bits wide) |
34 | | - --> $DIR/cast.rs:20:5 |
| 34 | + --> $DIR/cast.rs:19:5 |
35 | 35 | | |
36 | 36 | LL | x3 as f64; |
37 | 37 | | ^^^^^^^^^ |
38 | 38 |
|
39 | 39 | error: casting f32 to i32 may truncate the value |
40 | | - --> $DIR/cast.rs:22:5 |
| 40 | + --> $DIR/cast.rs:21:5 |
41 | 41 | | |
42 | 42 | LL | 1f32 as i32; |
43 | 43 | | ^^^^^^^^^^^ |
44 | 44 | | |
45 | 45 | = note: `-D clippy::cast-possible-truncation` implied by `-D warnings` |
46 | 46 |
|
47 | 47 | error: casting f32 to u32 may truncate the value |
48 | | - --> $DIR/cast.rs:23:5 |
| 48 | + --> $DIR/cast.rs:22:5 |
49 | 49 | | |
50 | 50 | LL | 1f32 as u32; |
51 | 51 | | ^^^^^^^^^^^ |
52 | 52 |
|
53 | 53 | error: casting f32 to u32 may lose the sign of the value |
54 | | - --> $DIR/cast.rs:23:5 |
| 54 | + --> $DIR/cast.rs:22:5 |
55 | 55 | | |
56 | 56 | LL | 1f32 as u32; |
57 | 57 | | ^^^^^^^^^^^ |
58 | 58 | | |
59 | 59 | = note: `-D clippy::cast-sign-loss` implied by `-D warnings` |
60 | 60 |
|
61 | 61 | error: casting f64 to f32 may truncate the value |
62 | | - --> $DIR/cast.rs:24:5 |
| 62 | + --> $DIR/cast.rs:23:5 |
63 | 63 | | |
64 | 64 | LL | 1f64 as f32; |
65 | 65 | | ^^^^^^^^^^^ |
66 | 66 |
|
67 | 67 | error: casting i32 to i8 may truncate the value |
68 | | - --> $DIR/cast.rs:25:5 |
| 68 | + --> $DIR/cast.rs:24:5 |
69 | 69 | | |
70 | 70 | LL | 1i32 as i8; |
71 | 71 | | ^^^^^^^^^^ |
72 | 72 |
|
73 | 73 | error: casting i32 to u8 may truncate the value |
74 | | - --> $DIR/cast.rs:26:5 |
| 74 | + --> $DIR/cast.rs:25:5 |
75 | 75 | | |
76 | 76 | LL | 1i32 as u8; |
77 | 77 | | ^^^^^^^^^^ |
78 | 78 |
|
79 | 79 | error: casting f64 to isize may truncate the value |
80 | | - --> $DIR/cast.rs:27:5 |
| 80 | + --> $DIR/cast.rs:26:5 |
81 | 81 | | |
82 | 82 | LL | 1f64 as isize; |
83 | 83 | | ^^^^^^^^^^^^^ |
84 | 84 |
|
85 | 85 | error: casting f64 to usize may truncate the value |
86 | | - --> $DIR/cast.rs:28:5 |
| 86 | + --> $DIR/cast.rs:27:5 |
87 | 87 | | |
88 | 88 | LL | 1f64 as usize; |
89 | 89 | | ^^^^^^^^^^^^^ |
90 | 90 |
|
91 | 91 | error: casting f64 to usize may lose the sign of the value |
92 | | - --> $DIR/cast.rs:28:5 |
| 92 | + --> $DIR/cast.rs:27:5 |
93 | 93 | | |
94 | 94 | LL | 1f64 as usize; |
95 | 95 | | ^^^^^^^^^^^^^ |
96 | 96 |
|
97 | 97 | error: casting u8 to i8 may wrap around the value |
98 | | - --> $DIR/cast.rs:30:5 |
| 98 | + --> $DIR/cast.rs:29:5 |
99 | 99 | | |
100 | 100 | LL | 1u8 as i8; |
101 | 101 | | ^^^^^^^^^ |
102 | 102 | | |
103 | 103 | = note: `-D clippy::cast-possible-wrap` implied by `-D warnings` |
104 | 104 |
|
105 | 105 | error: casting u16 to i16 may wrap around the value |
106 | | - --> $DIR/cast.rs:31:5 |
| 106 | + --> $DIR/cast.rs:30:5 |
107 | 107 | | |
108 | 108 | LL | 1u16 as i16; |
109 | 109 | | ^^^^^^^^^^^ |
110 | 110 |
|
111 | 111 | error: casting u32 to i32 may wrap around the value |
112 | | - --> $DIR/cast.rs:32:5 |
| 112 | + --> $DIR/cast.rs:31:5 |
113 | 113 | | |
114 | 114 | LL | 1u32 as i32; |
115 | 115 | | ^^^^^^^^^^^ |
116 | 116 |
|
117 | 117 | error: casting u64 to i64 may wrap around the value |
118 | | - --> $DIR/cast.rs:33:5 |
| 118 | + --> $DIR/cast.rs:32:5 |
119 | 119 | | |
120 | 120 | LL | 1u64 as i64; |
121 | 121 | | ^^^^^^^^^^^ |
122 | 122 |
|
123 | 123 | error: casting usize to isize may wrap around the value |
124 | | - --> $DIR/cast.rs:34:5 |
| 124 | + --> $DIR/cast.rs:33:5 |
125 | 125 | | |
126 | 126 | LL | 1usize as isize; |
127 | 127 | | ^^^^^^^^^^^^^^^ |
128 | 128 |
|
129 | | -error: casting f32 to f64 may become silently lossy if types change |
130 | | - --> $DIR/cast.rs:36:5 |
131 | | - | |
132 | | -LL | 1.0f32 as f64; |
133 | | - | ^^^^^^^^^^^^^ help: try: `f64::from(1.0f32)` |
134 | | - | |
135 | | - = note: `-D clippy::cast-lossless` implied by `-D warnings` |
136 | | - |
137 | | -error: casting u8 to u16 may become silently lossy if types change |
138 | | - --> $DIR/cast.rs:38:5 |
139 | | - | |
140 | | -LL | (1u8 + 1u8) as u16; |
141 | | - | ^^^^^^^^^^^^^^^^^^ help: try: `u16::from(1u8 + 1u8)` |
142 | | - |
143 | 129 | error: casting i32 to u32 may lose the sign of the value |
144 | | - --> $DIR/cast.rs:41:5 |
| 130 | + --> $DIR/cast.rs:36:5 |
145 | 131 | | |
146 | 132 | LL | -1i32 as u32; |
147 | 133 | | ^^^^^^^^^^^^ |
148 | 134 |
|
149 | 135 | error: casting isize to usize may lose the sign of the value |
150 | | - --> $DIR/cast.rs:43:5 |
| 136 | + --> $DIR/cast.rs:38:5 |
151 | 137 | | |
152 | 138 | LL | -1isize as usize; |
153 | 139 | | ^^^^^^^^^^^^^^^^ |
154 | 140 |
|
155 | 141 | error: casting to the same type is unnecessary (`i32` -> `i32`) |
156 | | - --> $DIR/cast.rs:52:5 |
| 142 | + --> $DIR/cast.rs:47:5 |
157 | 143 | | |
158 | 144 | LL | 1i32 as i32; |
159 | 145 | | ^^^^^^^^^^^ |
160 | 146 | | |
161 | 147 | = note: `-D clippy::unnecessary-cast` implied by `-D warnings` |
162 | 148 |
|
163 | 149 | error: casting to the same type is unnecessary (`f32` -> `f32`) |
164 | | - --> $DIR/cast.rs:53:5 |
| 150 | + --> $DIR/cast.rs:48:5 |
165 | 151 | | |
166 | 152 | LL | 1f32 as f32; |
167 | 153 | | ^^^^^^^^^^^ |
168 | 154 |
|
169 | 155 | error: casting to the same type is unnecessary (`bool` -> `bool`) |
170 | | - --> $DIR/cast.rs:54:5 |
| 156 | + --> $DIR/cast.rs:49:5 |
171 | 157 | | |
172 | 158 | LL | false as bool; |
173 | 159 | | ^^^^^^^^^^^^^ |
174 | 160 |
|
175 | 161 | error: casting integer literal to f32 is unnecessary |
176 | | - --> $DIR/cast.rs:57:5 |
| 162 | + --> $DIR/cast.rs:52:5 |
177 | 163 | | |
178 | 164 | LL | 100 as f32; |
179 | 165 | | ^^^^^^^^^^ help: try: `100_f32` |
180 | 166 |
|
181 | 167 | error: casting integer literal to f64 is unnecessary |
182 | | - --> $DIR/cast.rs:58:5 |
| 168 | + --> $DIR/cast.rs:53:5 |
183 | 169 | | |
184 | 170 | LL | 100 as f64; |
185 | 171 | | ^^^^^^^^^^ help: try: `100_f64` |
186 | 172 |
|
187 | 173 | error: casting integer literal to f64 is unnecessary |
188 | | - --> $DIR/cast.rs:59:5 |
| 174 | + --> $DIR/cast.rs:54:5 |
189 | 175 | | |
190 | 176 | LL | 100_i32 as f64; |
191 | 177 | | ^^^^^^^^^^^^^^ help: try: `100_f64` |
192 | 178 |
|
193 | | -error: aborting due to 30 previous errors |
| 179 | +error: aborting due to 28 previous errors |
194 | 180 |
|
0 commit comments