diff options
Diffstat (limited to 'src/test/ui/suggestions/multibyte-escapes.rs')
-rw-r--r-- | src/test/ui/suggestions/multibyte-escapes.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/multibyte-escapes.rs b/src/test/ui/suggestions/multibyte-escapes.rs new file mode 100644 index 000000000..fd5d46a4e --- /dev/null +++ b/src/test/ui/suggestions/multibyte-escapes.rs @@ -0,0 +1,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 +} |