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

macros: fix span of body variable #5244

Merged
merged 2 commits into from
Nov 29, 2022
Merged

macros: fix span of body variable #5244

merged 2 commits into from
Nov 29, 2022

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Nov 29, 2022

Motivation

Fixes #5243

Solution

This is basically the same problem as dtolnay/async-trait#104 and dtolnay/async-trait#46, and can be fixed by assigning a consistent span to the same variable. See also dtolnay/async-trait#105 (comment). (The root cause is a compiler bug that overwrites spans of non-:tt metavariables during declarative macro expansion.)

@taiki-e taiki-e added the A-tokio-macros Area: The tokio-macros crate label Nov 29, 2022
@taiki-e
Copy link
Member Author

taiki-e commented Nov 29, 2022

@Veykril: Could you check to see if this retains the behavior you were expecting with the #5092?

@Veykril
Copy link
Contributor

Veykril commented Nov 29, 2022

Some quick testing seems to indicate that this retains the behavior for r-a 👍 (even if it didn't, we are currently trying to fix our token mapping which makes the r-a hack here obsolete ideally, no ETA though)

@taiki-e taiki-e merged commit 5d25ec4 into master Nov 29, 2022
@taiki-e taiki-e deleted the taiki-e/issue-5243 branch November 29, 2022 18:50
@Thomasdezeeuw
Copy link
Contributor

@taiki-e can you make another release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio-macros Area: The tokio-macros crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tokio-macros 1.8.1 regression
3 participants