2021-07-31 07:37:01 -05:00
|
|
|
// Regression test for #87397.
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
b'µ';
|
2022-11-02 23:17:37 -05:00
|
|
|
//~^ ERROR: non-ASCII character in byte literal
|
2021-07-31 07:37:01 -05:00
|
|
|
//~| HELP: if you meant to use the unicode code point for 'µ', use a \xHH escape
|
2022-11-02 23:17:37 -05:00
|
|
|
//~| NOTE: must be ASCII
|
2021-07-31 07:37:01 -05:00
|
|
|
|
|
|
|
b'字';
|
2022-11-02 23:17:37 -05:00
|
|
|
//~^ ERROR: non-ASCII character in byte literal
|
2021-07-31 07:37:01 -05:00
|
|
|
//~| NOTE: this multibyte character does not fit into a single byte
|
2022-11-02 23:17:37 -05:00
|
|
|
//~| NOTE: must be ASCII
|
2021-07-31 07:37:01 -05:00
|
|
|
|
|
|
|
b"字";
|
2022-11-02 23:17:37 -05:00
|
|
|
//~^ ERROR: non-ASCII character in byte string literal
|
2021-07-31 07:37:01 -05:00
|
|
|
//~| HELP: if you meant to use the UTF-8 encoding of '字', use \xHH escapes
|
2022-11-02 23:17:37 -05:00
|
|
|
//~| NOTE: must be ASCII
|
2021-07-31 07:37:01 -05:00
|
|
|
}
|