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