Use structured suggestion for braceless unicode escape squence

This commit is contained in:
Esteban Küber
2018-12-27 11:21:47 -08:00
parent 7edc434b72
commit b416f1398f
5 changed files with 47 additions and 16 deletions

View File

@@ -35,4 +35,7 @@ fn main() {
//~^ ERROR invalid character in numeric character escape:
//~^^ ERROR form of character escape may only be used with characters in the range [\x00-\x7f]
//~^^^ ERROR incorrect unicode escape sequence
let _ = "\u8f";
//~^ ERROR incorrect unicode escape sequence
}

View File

@@ -118,5 +118,13 @@ help: format of unicode escape sequences is `/u{…}`
LL | let _ = "/xf /u";
| ^^
error: aborting due to 17 previous errors
error: incorrect unicode escape sequence
--> $DIR/issue-23620-invalid-escapes.rs:39:14
|
LL | let _ = "/u8f";
| ^^--
| |
| help: format of unicode escape sequences uses braces: `/u{8f}`
error: aborting due to 18 previous errors