Skip to content

Conversation

@dtolnay
Copy link
Owner

@dtolnay dtolnay commented Sep 26, 2020

This is not lexed as two consecutive lifetime tokens in Rust.

macro_rules! m {
    ($($tt:tt)*) => {};
}

m!('aa'aa);
error: character literal may only contain one codepoint
 --> src/main.rs:5:4
  |
5 | m!('aa'aa);
  |    ^^^^
  |
help: if you meant to write a `str` literal, use double quotes
  |
5 | m!("aa"aa);
  |    ^^^^

@dtolnay dtolnay merged commit 5d5fdb3 into dtolnay:master Sep 26, 2020
@dtolnay dtolnay deleted the lit branch September 26, 2020 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant