diff options
| author | dswij <dharmasw@outlook.com> | 2025-04-17 16:14:31 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-17 16:14:31 +0000 |
| commit | 94f0994b1b78fe042ea173e23bc66a3fa80bb34c (patch) | |
| tree | 5489f88f49e874756ef72e7c87aff43ac0cb05a5 /tests/rustdoc/source-code-pages/html-no-source.rs | |
| parent | 26f43ff346e911d8c5fc66e0fd9e2058ef82ca6e (diff) | |
| parent | 77b3ac3d5731b34441cb4ef0badcf9cc261b2013 (diff) | |
| download | rust-94f0994b1b78fe042ea173e23bc66a3fa80bb34c.tar.gz rust-94f0994b1b78fe042ea173e23bc66a3fa80bb34c.zip | |
Check for lifetime uses in closures as well (#14608)
The `BodyLifetimeChecker` which checks for the use of any non-anonymous non-static lifetime did not recurse into closures, missing lifetime uses. This would lead to a bogus elision suggestion. The `BodyLifetimeChecker` is not refined enough to avoid false positives, as any conforming lifetime, including one coming from the outer context, would be considered a hit. The number of false positives might increase now that we check closures as well, in case those closures define and use lifetimes themselves. changelog: [`needless_lifetimes`]: do not suggest removing a lifetime which is later used in a closure Fixes rust-lang/rust-clippy#14607
Diffstat (limited to 'tests/rustdoc/source-code-pages/html-no-source.rs')
0 files changed, 0 insertions, 0 deletions
