Improve incomplete unicode escape reporting
This improves diagnostic messages when \u escape is used incorrectly and { is
missing. Instead of saying “unknown character escape: u”, it will now report
that unicode escape sequence is incomplete and suggest what the correct syntax
is.
This commit is contained in:
parent
fd8e175c4e
commit
0bd5dd6449
2 changed files with 20 additions and 6 deletions
|
|
@ -41,5 +41,5 @@ fn main() {
|
|||
//~^ ERROR illegal unicode character escape
|
||||
//~^^ ERROR illegal character in numeric character escape:
|
||||
//~^^^ ERROR form of character escape may only be used with characters in the range [\x00-\x7f]
|
||||
//~^^^^ ERROR unknown character escape: u
|
||||
//~^^^^ ERROR incomplete unicode escape sequence
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue