-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
allow_attributes
triggers on variable name
#13380
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Comments
Byter09
added
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
labels
Sep 11, 2024
@rustbot claim |
workingjubilee
pushed a commit
to workingjubilee/rustc
that referenced
this issue
Sep 11, 2024
This is needed for Clippy to know that the `#[allow(unused)]` attributes added by the expansion of `?` are part of the desugaring, and that they do not come from the user code. rust-lang/rust-clippy#13380 exhibits a manifestation of this problem.
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Sep 11, 2024
…-fix, r=jieyouxu Use the same span for attributes and Try expansion of ? This is needed for Clippy to know that the `#[allow(unused)]` attributes added by the expansion of `?` are part of the desugaring, and that they do not come from the user code. rust-lang/rust-clippy#13380 exhibits a manifestation of this problem and will be fixed by this change.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 12, 2024
Rollup merge of rust-lang#130244 - samueltardieu:qmark-expansion-span-fix, r=jieyouxu Use the same span for attributes and Try expansion of ? This is needed for Clippy to know that the `#[allow(unused)]` attributes added by the expansion of `?` are part of the desugaring, and that they do not come from the user code. rust-lang/rust-clippy#13380 exhibits a manifestation of this problem and will be fixed by this change.
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this issue
Sep 12, 2024
…ieyouxu Use the same span for attributes and Try expansion of ? This is needed for Clippy to know that the `#[allow(unused)]` attributes added by the expansion of `?` are part of the desugaring, and that they do not come from the user code. rust-lang/rust-clippy#13380 exhibits a manifestation of this problem and will be fixed by this change.
Thanks for the report @Byter09. This should be fixed in Rust/Clippy 1.83, as it was due to a bug in the rust compiler and has been fixed for 1.83. |
Neat. Thanks for the quick fix. :D |
shrirambalaji
pushed a commit
to shrirambalaji/rust
that referenced
this issue
Oct 6, 2024
This is needed for Clippy to know that the `#[allow(unused)]` attributes added by the expansion of `?` are part of the desugaring, and that they do not come from the user code. rust-lang/rust-clippy#13380 exhibits a manifestation of this problem.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
When upgrading to 1.81.0 the lint triggered on a variable in our code. I managed to produce a minimal example, unsure if it can be even smaller.
Lint Name
allow_attributes
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: