summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/multibyte-escapes.rs
blob: fd5d46a4e923e8fdc295f2befb66eaed6b73ee13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Regression test for #87397.

fn main() {
    b'µ';
    //~^ ERROR: non-ASCII character in byte constant
    //~| HELP: if you meant to use the unicode code point for 'µ', use a \xHH escape
    //~| NOTE: byte constant must be ASCII

    b'字';
    //~^ ERROR: non-ASCII character in byte constant
    //~| NOTE: this multibyte character does not fit into a single byte
    //~| NOTE: byte constant must be ASCII

    b"字";
    //~^ ERROR: non-ASCII character in byte constant
    //~| HELP: if you meant to use the UTF-8 encoding of '字', use \xHH escapes
    //~| NOTE: byte constant must be ASCII
}