]> git.lizzy.rs Git - rust.git/blob - tests/ui/char_lit_as_u8.stderr
Merge branch 'master' into rustfmt_tests
[rust.git] / tests / ui / 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   --> $DIR/char_lit_as_u8.rs:13:13
3    |
4 13 |     let c = 'a' as u8;
5    |             ^^^^^^^^^
6    |
7    = note: `-D clippy::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
12