Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/async-await/issues/issue-63388-3.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
166 B
Rust
Raw Normal View History

revamp how we handle elision in async fn We now always make fresh lifetimne parameters for all elided lifetimes, whether they are in the inputs or outputs. But then we generate `'_` in the case of elided lifetimes from the outputs. Example: ```rust async fn foo<'a>(x: &'a u32) -> &u32 { .. } ``` becomes ```rust type Foo<'a, 'b> = impl Future<Output = &'b u32>; fn foo<'a>(x: &'a u32) -> Foo<'a, '_> ```
2019-08-12 17:15:33 -04:00
//@ edition:2018
//@ check-pass
struct Xyz {
a: u64,
}
trait Foo {}
impl Xyz {
async fn do_sth(
&self, foo: &dyn Foo
) {
}
}
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2290ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API