mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-11 22:02:55 +00:00
12 lines
404 B
Text
12 lines
404 B
Text
error: casting a character literal to `u8` truncates
|
|
--> tests/ui/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`
|
|
= help: to override `-D warnings` add `#[allow(clippy::char_lit_as_u8)]`
|
|
|
|
error: aborting due to 1 previous error
|
|
|