rust-clippy/tests/ui/char_lit_as_u8.stderr
2023-08-22 17:17:48 +02:00

11 lines
322 B
Text

error: casting a character literal to `u8` truncates
--> $DIR/char_lit_as_u8.rs:5:13
|
LL | let _ = '❤' as u8;
| ^^^^^^^^^
|
= note: `char` is four bytes wide, but `u8` is a single byte
= note: `-D clippy::char-lit-as-u8` implied by `-D warnings`
error: aborting due to previous error