mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
11 lines
373 B
Text
11 lines
373 B
Text
error: casting a character literal to `u8` truncates
|
|
--> $DIR/char_lit_as_u8.rs:4:13
|
|
|
|
|
LL | let _ = '❤' as u8; // no suggestion, since a byte literal won't work.
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::char-lit-as-u8` implied by `-D warnings`
|
|
= note: `char` is four bytes wide, but `u8` is a single byte
|
|
|
|
error: aborting due to previous error
|
|
|