bors 8a78128e9d Auto merge of #12386 - Ethiraric:fix-12381, r=blyxyas
[`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
2024-03-14 16:28:57 +00:00
..
2024-03-01 16:37:23 +01:00
2024-03-01 16:37:23 +01:00
2024-03-01 16:37:23 +01:00
2024-03-01 16:37:23 +01:00
2024-03-01 16:36:04 +01:00
2024-03-01 16:37:23 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-14 12:40:33 +09:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-09 12:43:19 +01:00
2024-03-09 12:43:19 +01:00
2024-03-08 22:39:36 -05:00
2024-03-01 16:36:04 +01:00
2024-03-01 16:36:04 +01:00
2024-03-01 16:37:23 +01:00
2024-03-03 08:32:30 +01:00
2024-03-03 08:32:30 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00