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: When checking for forbidden expr kind matches, account for rawness #18153

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

ChayimFriedman2
Copy link
Contributor

An expression starting with r#const etc. should be accepted even in edition <=2021.

Fixes #18148.

This was not fixed when testing with edition 2024, I wonder whether that means our check for edition is incorrect...

An expression starting with `r#const` etc. should be accepted even in edition <=2021.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 19, 2024
@Veykril
Copy link
Member

Veykril commented Sep 20, 2024

Do we even need this check anymore at this point? I imagine this was done because our parser was not edition aware at the time

@ChayimFriedman2
Copy link
Contributor Author

I don't think the parser differentiates between those and other exprs when in macro (although it can be done probably). The entry point is just Expr. So I believe the check is still needed.

@Veykril
Copy link
Member

Veykril commented Sep 20, 2024

Right, the edition gating doesn't matter here my bad.
Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Sep 20, 2024

📌 Commit 5c06f04 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 20, 2024

⌛ Testing commit 5c06f04 with merge b2a9cc4...

@bors
Copy link
Collaborator

bors commented Sep 20, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing b2a9cc4 to master...

@bors bors merged commit b2a9cc4 into rust-lang:master Sep 20, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

r#const sometimes does not match in declarative macros
4 participants