diff --git a/src/parse/ident.rs b/src/parse/ident.rs index d6cb028..3a27ed4 100644 --- a/src/parse/ident.rs +++ b/src/parse/ident.rs @@ -117,7 +117,7 @@ impl<'a, 'b> Parser<'a, 'b> { self.toks.next(); } - let c = std::char::from_u32(value).ok_or(("Invalid escape sequence.", span))?; + let c = std::char::from_u32(value).ok_or(("Invalid Unicode code point.", span))?; if (identifier_start && is_name_start(c) && !c.is_digit(10)) || (!identifier_start && is_name(c)) { diff --git a/tests/str-escape.rs b/tests/str-escape.rs index 966d0d2..537109e 100644 --- a/tests/str-escape.rs +++ b/tests/str-escape.rs @@ -178,7 +178,7 @@ test!( ); error!( escape_sequence_does_not_fit_inside_char, - "a {\n color: \\110000;\n}\n", "Error: Invalid escape sequence." + "a {\n color: \\110000;\n}\n", "Error: Invalid Unicode code point." ); test!( escaped_newline_in_quoted_string, diff --git a/tests/variables.rs b/tests/variables.rs index 97bc66f..fbaf125 100644 --- a/tests/variables.rs +++ b/tests/variables.rs @@ -399,7 +399,7 @@ error!( ); error!( invalid_escape, - "$\\110000: red;", "Error: Invalid escape sequence." + "$\\110000: red;", "Error: Invalid Unicode code point." ); error!( nothing_after_hash_in_variable_decl,