mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
8a78128e9d
[`use_self`]: Make it aware of lifetimes Have the lint trigger even if `Self` has generic lifetime parameters. ```rs impl<'a> Foo<'a> { type Item = Foo<'a>; // Can be replaced with Self fn new() -> Self { Foo { // No lifetime, but they are inferred to be that of Self // Can be replaced as well ... } } // Don't replace `Foo<'b>`, the lifetime is different! fn eq<'b>(self, other: Foo<'b>) -> bool { .. } ``` Fixes #12381 *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: [`use_self`]: Have the lint trigger even if `Self` has generic lifetime parameters |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
headers.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |