bfa5f27847
Currently, we deal with escape sequences twice: once when we lex a string, and a second time when we unescape literals. This PR aims to remove this duplication, by introducing a new `unescape` mode as a single source of truth for character escaping rules
19 lines
445 B
Plaintext
19 lines
445 B
Plaintext
error: invalid unicode character escape
|
|
--> $DIR/new-unicode-escapes-3.rs:2:15
|
|
|
|
|
LL | let s1 = "\u{d805}";
|
|
| ^^^^^^^^
|
|
|
|
|
= help: unicode escape must not be a surrogate
|
|
|
|
error: invalid unicode character escape
|
|
--> $DIR/new-unicode-escapes-3.rs:3:15
|
|
|
|
|
LL | let s2 = "\u{ffffff}";
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: unicode escape must be at most 10FFFF
|
|
|
|
error: aborting due to 2 previous errors
|
|
|