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

Move raw ident validate into validate_ident

merged 2 commits into from Jun 20, 2022

Move raw ident validate into validate_ident #332

merged 2 commits into from Jun 20, 2022


Copy link

@dtolnay dtolnay commented Jun 20, 2022

Keep the panicks together.

Structuring it this way reveals that it isn't even possible for string to be "" or "$crate" or "{{root}}" at the location that the validation happens. I will delete those cases in a separate PR.

dtolnay added 2 commits Jun 20, 2022
    error[E0658]: multiple patterns in `if let` and `while let` are unstable (see issue #48215)
       --> src/
    704 | /         if let "" | "_" | "super" | "self" | "Self" | "crate" | "$crate" | "{{root}}" = string {
    705 | |             panic!("`{}` cannot be a raw identifier", string);
    706 | |         }
        | |_________^
@dtolnay dtolnay merged commit 83ed7b8 into master Jun 20, 2022
16 checks passed
@dtolnay dtolnay deleted the validate branch Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant