You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split elided_lifetime_in_paths into tied and untied
Types that contain a reference can be confusing when lifetime elision
occurs:
```rust
// Confusing
fn foo(_: &u8) -> Bar { todo!() }
// Less confusing
fn foo(_: &u8) -> Bar<'_> { todo!() }
```
However, the previous lint did not distinguish when these types were
not "tying" lifetimes across the function inputs / outputs:
```rust
// Maybe a little confusing
fn foo(_: Bar) {}
// More explicit but noisier with less obvious value
fn foo(_: Bar<'_>) {}
```
We now report different lints for each case, hopefully paving the way
to marking the first case (when lifetimes are tied together) as
warn-by-default.
Additionally, when multiple errors occur in the same function during
the tied case, they are coalesced into one error. There is also some
help text pointing out where the lifetime source is.
0 commit comments