]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/multibyte-escapes.rs
Rollup merge of #107116 - ozkanonur:consolidate-bootstrap-docs, r=jyn514
[rust.git] / tests / ui / suggestions / multibyte-escapes.rs
1 // Regression test for #87397.
2
3 fn main() {
4     b'µ';
5     //~^ ERROR: non-ASCII character in byte literal
6     //~| HELP: if you meant to use the unicode code point for 'µ', use a \xHH escape
7     //~| NOTE: must be ASCII
8
9     b'字';
10     //~^ ERROR: non-ASCII character in byte literal
11     //~| NOTE: this multibyte character does not fit into a single byte
12     //~| NOTE: must be ASCII
13
14     b"字";
15     //~^ ERROR: non-ASCII character in byte string literal
16     //~| HELP: if you meant to use the UTF-8 encoding of '字', use \xHH escapes
17     //~| NOTE: must be ASCII
18 }