]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/char_lit_as_u8.stderr
9560ab924c6505922f4d8d4789addccd712300c7
[rust.git] / clippy_tests / examples / char_lit_as_u8.stderr
1 error: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them
2  --> char_lit_as_u8.rs:7:13
3   |
4 7 |     let c = 'a' as u8;
5   |             ^^^^^^^^^
6   |
7   = note: `-D char-lit-as-u8` implied by `-D warnings`
8   = help: Consider using a byte literal instead:
9           b'a'
10
11 error: aborting due to previous error(s)
12
13 error: Could not compile `clippy_tests`.
14
15 To learn more, run the command again with --verbose.