-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Possible problems involving clippy::shadow_reuse
and auto-generated code
#9757
Comments
clippy::shadow_reuse
and auto-generated codeclippy::shadow_reuse
and auto-generated code
A fix for this case would be to check It wouldn't be intended for this to lint, macro span interactions are just non obvious |
Closing due to the lack of activity. |
The issue isn't fixed |
I am house-keeping my dashboard closing inactive issues that will probably take some time to resolve. For this use-case specifically, I guess I can try to solve the problem. |
I am trying to take a look at this issue. Although, this would be my first contribution here. Not linting the code if Thanks for the patience in helping a new contributor wannabe! |
In regards to test addition or how to test this issue specifically, I really have no clue because https://github.com/rust-lang/rust-clippy/pull/10203/files#diff-98b6b061d5b311aae09fd482c612aab5544d55b9c0da67438d79ef0fe181d526R129-R159 didn't help. Perhaps one of the Clippy members can help you? @Alexendoo @Jarcho @xFrednet EDIT: Oops, if |
You can add a test along the lines of macro_rules! reuse {
($v:ident) => {
let $v = $v + 1;
}
}
let x = 1;
reuse!(x); |
Description
According to dtolnay/quote#232 (comment),
clippy::shadow_reuse
shouldn't be triggered but I am personally not aware of this intended limitation. Any thoughts?Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: