about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authordswij <dharmasw@outlook.com>2025-04-17 16:14:31 +0000
committerGitHub <noreply@github.com>2025-04-17 16:14:31 +0000
commit94f0994b1b78fe042ea173e23bc66a3fa80bb34c (patch)
tree5489f88f49e874756ef72e7c87aff43ac0cb05a5 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent26f43ff346e911d8c5fc66e0fd9e2058ef82ca6e (diff)
parent77b3ac3d5731b34441cb4ef0badcf9cc261b2013 (diff)
downloadrust-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 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions