-
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
use_self is triggered inside derived code #6818
Comments
Is it possible that this is a regression? I haven't seen this before while getting proper warnings for this lint, but it popped up today for all my serde derives. Last I checked was some time ago though. |
having the same issue in gitui where I am supposed to name my struct itself see https://github.com/extrawurst/gitui/blob/bd54b47d194934b5860ec762bc658349b151db3a/src/keys.rs#L19
and yeah this is definitely a regression. this did not happen before |
Fixed in rust-lang/rust-clippy#6818 but requires a new clippy release.
Fixed in rust-lang/rust-clippy#6818 but requires a new clippy release.
Fixed in rust-lang/rust-clippy#6818 but requires a new clippy release.
Fixed in rust-lang/rust-clippy#6818 but requires a new clippy release.
It looks like
use_self
is triggered inside derived macro-generated code. While derived macro authors may handle that on their part, it is still not feasible to expect that to happen overnight. Right now everyone wishing to use this lint inside their own code is affected.Lint name: use_self
I tried this code:
I expected to see this happen: clean cargo clippy run
Instead, this happened:
Meta
cargo clippy -V
: clippy 0.1.52 (e37a13c 2021-02-28)rustc -Vv
:rustc 1.52.0-nightly (e37a13c 2021-02-28)
binary: rustc
commit-hash: e37a13c
commit-date: 2021-02-28
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 11.0.1
The text was updated successfully, but these errors were encountered: