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

Metavariables can be keywords #863

Closed
wants to merge 1 commit into from
Closed

Metavariables can be keywords #863

wants to merge 1 commit into from

Conversation

jonas-schievink
Copy link
Contributor

No description provided.

@ehuss
Copy link
Contributor

ehuss commented Jul 29, 2020

Thanks! Do you happen to know the history here? It looks like this changed in 1.17 (though there weren't any notes about it). I'm guessing it was via rust-lang/rust#39419?

It looks like this also allows raw identifiers. Example:

macro_rules! foo {
    ($r#fn:expr) => {$r#fn};
}

which seems a little odd to me. 🤷 Maybe the "identifiers" page should have a production for whatever "ident or keyword or raw keyword" should be called?

Dunno if this is actually intended.

@jonas-schievink
Copy link
Contributor Author

I have no idea about the history here, sorry. I just noticed that rust-analyzer does some gymnastics to also allow keywords here, and realized that rustc also allows them.

@jonas-schievink
Copy link
Contributor Author

Maybe the "identifiers" page should have a production for whatever "ident or keyword or raw keyword" should be called?

Is there any place in Rust where a normal ident is allowed but a raw ident isn't?

@ehuss
Copy link
Contributor

ehuss commented Aug 11, 2020

Is there any place in Rust where a normal ident is allowed but a raw ident isn't?

LIFETIME_OR_LABEL

@ehuss ehuss added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Aug 25, 2020
@mattheww
Copy link
Contributor

mattheww commented Sep 6, 2023

This change was later made in #1130.

@ehuss
Copy link
Contributor

ehuss commented Sep 6, 2023

Indeed, I think this can be closed, thanks!

@ehuss ehuss closed this Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants