about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/asm.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-05-30 23:08:42 +0200
committerGitHub <noreply@github.com>2020-05-30 23:08:42 +0200
commitf1661d23e386ecd2d2ebb7990fa4cb459b2896f6 (patch)
tree80d3c14e31f5f13ff465dc2c09cfee19ed8f7839 /src/librustc_codegen_llvm/asm.rs
parent74e80468347471779be6060d8d7d6d04e98e467f (diff)
parent83f6f2235892853c152d08551975525b7ae79914 (diff)
downloadrust-f1661d23e386ecd2d2ebb7990fa4cb459b2896f6.tar.gz
rust-f1661d23e386ecd2d2ebb7990fa4cb459b2896f6.zip
Rollup merge of #72543 - estebank:opaque-missing-lts-in-fn, r=nikomatsakis
Account for missing lifetime in opaque and trait object return types

When encountering an opaque closure return type that needs to bound a
lifetime to the function's arguments, including borrows and type params,
provide appropriate suggestions that lead to working code.

Get the user from

```rust
fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce()
where
    G: Get<T>
{
    move || {
        *dest = g.get();
    }
}
```

to

```rust
fn foo<'a, G: 'a, T>(g: G, dest: &'a mut T) -> impl FnOnce() +'a
where
    G: Get<T>
{
    move || {
        *dest = g.get();
    }
}
```
Diffstat (limited to 'src/librustc_codegen_llvm/asm.rs')
0 files changed, 0 insertions, 0 deletions