@@ -42,7 +42,7 @@ error: casting `f32` to `i32` may truncate the value
4242LL | 1f32 as i32;
4343 | ^^^^^^^^^^^
4444 |
45- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
45+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
4646 = note: `-D clippy::cast-possible-truncation` implied by `-D warnings`
4747help: ... or use `try_from` and handle the error accordingly
4848 |
@@ -55,7 +55,7 @@ error: casting `f32` to `u32` may truncate the value
5555LL | 1f32 as u32;
5656 | ^^^^^^^^^^^
5757 |
58- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
58+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
5959help: ... or use `try_from` and handle the error accordingly
6060 |
6161LL | u32::try_from(1f32);
@@ -75,7 +75,7 @@ error: casting `f64` to `f32` may truncate the value
7575LL | 1f64 as f32;
7676 | ^^^^^^^^^^^
7777 |
78- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
78+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
7979help: ... or use `try_from` and handle the error accordingly
8080 |
8181LL | f32::try_from(1f64);
@@ -87,7 +87,7 @@ error: casting `i32` to `i8` may truncate the value
8787LL | 1i32 as i8;
8888 | ^^^^^^^^^^
8989 |
90- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
90+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
9191help: ... or use `try_from` and handle the error accordingly
9292 |
9393LL | i8::try_from(1i32);
@@ -99,7 +99,7 @@ error: casting `i32` to `u8` may truncate the value
9999LL | 1i32 as u8;
100100 | ^^^^^^^^^^
101101 |
102- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
102+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
103103help: ... or use `try_from` and handle the error accordingly
104104 |
105105LL | u8::try_from(1i32);
@@ -111,7 +111,7 @@ error: casting `f64` to `isize` may truncate the value
111111LL | 1f64 as isize;
112112 | ^^^^^^^^^^^^^
113113 |
114- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
114+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
115115help: ... or use `try_from` and handle the error accordingly
116116 |
117117LL | isize::try_from(1f64);
@@ -123,7 +123,7 @@ error: casting `f64` to `usize` may truncate the value
123123LL | 1f64 as usize;
124124 | ^^^^^^^^^^^^^
125125 |
126- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
126+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
127127help: ... or use `try_from` and handle the error accordingly
128128 |
129129LL | usize::try_from(1f64);
@@ -141,7 +141,7 @@ error: casting `u32` to `u16` may truncate the value
141141LL | 1f32 as u32 as u16;
142142 | ^^^^^^^^^^^^^^^^^^
143143 |
144- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
144+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
145145help: ... or use `try_from` and handle the error accordingly
146146 |
147147LL | u16::try_from(1f32 as u32);
@@ -153,7 +153,7 @@ error: casting `f32` to `u32` may truncate the value
153153LL | 1f32 as u32 as u16;
154154 | ^^^^^^^^^^^
155155 |
156- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
156+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
157157help: ... or use `try_from` and handle the error accordingly
158158 |
159159LL | u32::try_from(1f32) as u16;
@@ -215,7 +215,7 @@ error: casting `i64` to `i8` may truncate the value
215215LL | (-99999999999i64).min(1) as i8; // should be linted because signed
216216 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
217217 |
218- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
218+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
219219help: ... or use `try_from` and handle the error accordingly
220220 |
221221LL | i8::try_from((-99999999999i64).min(1)); // should be linted because signed
@@ -227,7 +227,7 @@ error: casting `u64` to `u8` may truncate the value
227227LL | 999999u64.clamp(0, 256) as u8; // should still be linted
228228 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
229229 |
230- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
230+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
231231help: ... or use `try_from` and handle the error accordingly
232232 |
233233LL | u8::try_from(999999u64.clamp(0, 256)); // should still be linted
@@ -239,7 +239,7 @@ error: casting `main::E2` to `u8` may truncate the value
239239LL | let _ = self as u8;
240240 | ^^^^^^^^^^
241241 |
242- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
242+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
243243help: ... or use `try_from` and handle the error accordingly
244244 |
245245LL | let _ = u8::try_from(self);
@@ -259,7 +259,7 @@ error: casting `main::E5` to `i8` may truncate the value
259259LL | let _ = self as i8;
260260 | ^^^^^^^^^^
261261 |
262- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
262+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
263263help: ... or use `try_from` and handle the error accordingly
264264 |
265265LL | let _ = i8::try_from(self);
@@ -277,7 +277,7 @@ error: casting `main::E6` to `i16` may truncate the value
277277LL | let _ = self as i16;
278278 | ^^^^^^^^^^^
279279 |
280- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
280+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
281281help: ... or use `try_from` and handle the error accordingly
282282 |
283283LL | let _ = i16::try_from(self);
@@ -289,7 +289,7 @@ error: casting `main::E7` to `usize` may truncate the value on targets with 32-b
289289LL | let _ = self as usize;
290290 | ^^^^^^^^^^^^^
291291 |
292- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
292+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
293293help: ... or use `try_from` and handle the error accordingly
294294 |
295295LL | let _ = usize::try_from(self);
@@ -301,7 +301,7 @@ error: casting `main::E10` to `u16` may truncate the value
301301LL | let _ = self as u16;
302302 | ^^^^^^^^^^^
303303 |
304- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
304+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
305305help: ... or use `try_from` and handle the error accordingly
306306 |
307307LL | let _ = u16::try_from(self);
@@ -313,7 +313,7 @@ error: casting `u32` to `u8` may truncate the value
313313LL | let c = (q >> 16) as u8;
314314 | ^^^^^^^^^^^^^^^
315315 |
316- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
316+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
317317help: ... or use `try_from` and handle the error accordingly
318318 |
319319LL | let c = u8::try_from((q >> 16));
@@ -325,7 +325,7 @@ error: casting `u32` to `u8` may truncate the value
325325LL | let c = (q / 1000) as u8;
326326 | ^^^^^^^^^^^^^^^^
327327 |
328- = help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss )]` ...
328+ = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation )]` ...
329329help: ... or use `try_from` and handle the error accordingly
330330 |
331331LL | let c = u8::try_from((q / 1000));
0 commit comments