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

Remove incorrect spanned quote usage #279

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

GnomedDev
Copy link
Contributor

quote_spanned should be used for associating Box::new(#init) with the init span, for example. This crate is associating a lot of the returned tokens with the input tokens, which breaks clippy's "are these tokens from a proc macro" checks, which leads to issues like rust-lang/rust-clippy#13349 which are unsolvable from our end (to my knowledge).

This PR swaps with normal quote, and adds a test to make sure that none of the allow attributes get associated with input tokens to prevent the specific clippy issue from reappearing.

@Lokathor Lokathor added the proc-macros I don't do proc-macros, but I accepts PRs about them. label Oct 19, 2024
@Lokathor Lokathor merged commit 79a15d0 into Lokathor:main Oct 19, 2024
14 checks passed
@Lokathor
Copy link
Owner

may take me a bit to publish this but thanks for the fix

@GnomedDev GnomedDev deleted the remove-spanned-quote branch October 19, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proc-macros I don't do proc-macros, but I accepts PRs about them.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants