From 0bd5dd6449c9db734bd2d1700ea4b50e22b220be Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Fri, 10 Jul 2015 21:37:21 +0300 Subject: Improve incomplete unicode escape reporting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/test/parse-fail/issue-23620-invalid-escapes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/parse-fail') diff --git a/src/test/parse-fail/issue-23620-invalid-escapes.rs b/src/test/parse-fail/issue-23620-invalid-escapes.rs index 7930ea75bf5..98db3efe114 100644 --- a/src/test/parse-fail/issue-23620-invalid-escapes.rs +++ b/src/test/parse-fail/issue-23620-invalid-escapes.rs @@ -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 } -- cgit 1.4.1-3-g733a5