about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-01-14 17:27:15 +0000
committerbors <bors@rust-lang.org>2021-01-14 17:27:15 +0000
commit4275ef6c9d994bb6d0e2f42e0ee0aa1603a3c8a6 (patch)
treee85e8fd8e1359a90e62747380083d6ad88bf9797 /compiler/rustc_codegen_llvm/src/llvm
parentd03fe84169d50a4b96cdef7b2f862217ab634055 (diff)
parent64f11b96396ded4388618af95d639ae9be0978e9 (diff)
downloadrust-4275ef6c9d994bb6d0e2f42e0ee0aa1603a3c8a6.tar.gz
rust-4275ef6c9d994bb6d0e2f42e0ee0aa1603a3c8a6.zip
Auto merge of #79689 - Vooblin:patch1, r=tmandry
Update tests of "unused_lifetimes" lint for async functions and corresponding source code

Before this PR the following code would cause an error:
```
#![deny(unused_lifetimes)]
async fn f<'a>(_: &'a i32) {}
fn main() {}
```
It was happening because of the desugaring of return type in async functions. As a result of the desugaring, the return type contains all lifetimes involved in the function signature. And these lifetimes were interpreted separately from the same in the function scope => so they are unused.

Now, all lifetimes from the return type are interpreted as used. It is also not perfect, but at least this lint doesn't cause wrong errors now.

This PR connected to issues #78522, #77217
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
0 files changed, 0 insertions, 0 deletions