mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-22 11:53:44 +00:00

Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro expansion of literal prefixes. Fix #123696.
9 lines
164 B
Rust
9 lines
164 B
Rust
macro_rules! lexes {($($_:tt)*) => {}}
|
|
|
|
lexes!(🐛#); //~ ERROR identifiers cannot contain emoji
|
|
lexes!(🐛"foo");
|
|
lexes!(🐛'q');
|
|
lexes!(🐛'q);
|
|
|
|
fn main() {}
|