mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 04:55:22 +03:00
5c2601af15
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