Skip to content

fix: Fix a bug in MBE expansion that arose from incorrect fixing of an older bug in MBE #19501

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

Merged
merged 1 commit into from
Apr 5, 2025

Conversation

ChayimFriedman2
Copy link
Contributor

Specifically, #18744 was the PR that was supposed to fix the old bug, but it fixed it incorrectly (and didn't add a test!) The underlying reason was that we marked metavariables in expansions as joint if they were joint in the macro call, which is incorrect.

This wrong fix causes other bug, #19497, which this PR fixes by removing the old (incorrect) fix.

Fixes #19497.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 1, 2025
@davidbarsky
Copy link
Contributor

lgtm, modulo clippy.

@ChayimFriedman2
Copy link
Contributor Author

@davidbarsky Fixed Clippy.

…er bug in MBE

Specifically, rust-lang#18744 was the PR that was supposed to fix the old bug, but it fixed it incorrectly (and didn't add a test!) The underlying reason was that we marked metavariables in expansions as joint if they were joint in the macro call, which is incorrect.

This wrong fix causes other bug, rust-lang#19497, which this PR fixes by removing the old (incorrect) fix.
@Veykril Veykril added this pull request to the merge queue Apr 5, 2025
Merged via the queue into rust-lang:master with commit 1d1771c Apr 5, 2025
12 checks passed
@ChayimFriedman2 ChayimFriedman2 deleted the macro-expansion branch April 5, 2025 18:40
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.

Leftover tokens in valid macro
4 participants