Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic on parsing disallowed raw identifier in fallback mode #351

Merged
merged 1 commit into from Sep 28, 2022

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Sep 28, 2022

Repro:

fn main() {
    _ = "r#self".parse::<proc_macro2::TokenStream>();
}

This used to panic, now it will return an error.

$ cargo run
thread 'main' panicked at '`r#self` cannot be a raw identifier', proc-macro2/src/fallback.rs:756:17

@dtolnay dtolnay merged commit 164a5fd into master Sep 28, 2022
@dtolnay dtolnay deleted the badraw branch September 28, 2022 20:28
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.

None yet

1 participant