-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
False positive on used_underscore_binding #9131
Closed
hellow554 opened this issue
Jul 7, 2022
· 1 comment
· Fixed by rust-lang/rust#99026 or rust-lang/rust#99047
Closed
False positive on used_underscore_binding #9131
hellow554 opened this issue
Jul 7, 2022
· 1 comment
· Fixed by rust-lang/rust#99026 or rust-lang/rust#99047
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
@rustbot claim |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jul 8, 2022
Add test for and fix rust-lang/rust-clippy#9131 This lint seems to have been broken by rust-lang#98446 -- but of course, there was no clippy test for this case at the time. `expr.span.ctxt().outer_expn_data()` now has `MacroKind::Derive` instead of `MacroKind::Attr` for something like: ``` #[derive(Clone, Debug)] pub struct UnderscoreInStruct { _foo: u32, } ``` --- changelog: none closes: rust-lang/rust-clippy#9131
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Jul 8, 2022
Add test for and fix rust-lang/rust-clippy#9131 This lint seems to have been broken by rust-lang#98446 -- but of course, there was no clippy test for this case at the time. `expr.span.ctxt().outer_expn_data()` now has `MacroKind::Derive` instead of `MacroKind::Attr` for something like: ``` #[derive(Clone, Debug)] pub struct UnderscoreInStruct { _foo: u32, } ``` --- changelog: none closes: rust-lang/rust-clippy#9131
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jul 8, 2022
Add test for and fix rust-lang/rust-clippy#9131 This lint seems to have been broken by rust-lang#98446 -- but of course, there was no clippy test for this case at the time. `expr.span.ctxt().outer_expn_data()` now has `MacroKind::Derive` instead of `MacroKind::Attr` for something like: ``` #[derive(Clone, Debug)] pub struct UnderscoreInStruct { _foo: u32, } ``` --- changelog: none closes: rust-lang/rust-clippy#9131
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 8, 2022
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#95635 (sess: stabilize `--terminal-width` as `--diagnostic-width`) - rust-lang#98718 (Stabilize `into_future`) - rust-lang#98795 (A few cleanups) - rust-lang#98798 (Fix caching bug in `download-rustc = true`) - rust-lang#99019 (Add doc comments in `rustc_middle::mir`) - rust-lang#99026 (Add test for and fix rust-lang/rust-clippy#9131) Failed merges: - rust-lang#98957 ( don't allow ZST in ScalarInt ) r? `@ghost` `@rustbot` modify labels: rollup
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this issue
Jul 14, 2022
This lint seems to have been broken by #98446
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this issue
Jul 14, 2022
Add test for and fix rust-lang#9131 This lint seems to have been broken by #98446 -- but of course, there was no clippy test for this case at the time. `expr.span.ctxt().outer_expn_data()` now has `MacroKind::Derive` instead of `MacroKind::Attr` for something like: ``` #[derive(Clone, Debug)] pub struct UnderscoreInStruct { _foo: u32, } ``` --- changelog: none closes: rust-lang#9131
# for free
to join this conversation on GitHub.
Already have an account?
# 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
Maybe that lint should check for the
#[automatically_derived]
attribute on impls to fix this?Lint Name
used_underscore_binding
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Nothing
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: