rust/clippy_lints
Fridtjof Stoldt 5c2601af15
Do not propose to elide lifetimes if this causes an ambiguity (#13929)
Some lifetimes in function return types are not bound to concrete
content and can be set arbitrarily. Clippy should not propose to replace
them by the default `'_` lifetime if such a lifetime cannot be
determined unambigously.

I added a field to the `LifetimeChecker` and `Usage` to flag lifetimes
that cannot be replaced by default ones, but it feels a bit hacky.

Fix #13923

changelog: [`needless_lifetimes`]: remove false positives by checking
that lifetimes can indeed be elided
2025-01-10 11:58:29 +00:00
..
src Do not propose to elide lifetimes if this causes an ambiguity (#13929) 2025-01-10 11:58:29 +00:00
Cargo.toml Bump Clippy version -> 0.1.86 2025-01-09 18:01:44 +01:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.