]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/byte-string-literals.stderr
Fix invalid suggestions for non-ASCII characters in byte constants
[rust.git] / src / test / ui / parser / byte-string-literals.stderr
index 3a5a8b331d339dd1db09b29745c6dbfeb6875089..4f22a16224f0c3f2b9fc4bc9f4588b19ea0189d4 100644 (file)
@@ -24,10 +24,12 @@ error: non-ASCII character in byte constant
   --> $DIR/byte-string-literals.rs:6:7
    |
 LL |     b"é";
-   |       ^
-   |       |
-   |       byte constant must be ASCII
-   |       help: use a \xHH escape for a non-ASCII byte: `\xE9`
+   |       ^ byte constant must be ASCII
+   |
+help: if you meant to use the unicode code point for 'é', use a \xHH escape
+   |
+LL |     b"\xE9";
+   |       ^^^^
 
 error: raw byte string must be ASCII
   --> $DIR/byte-string-literals.rs:7:10