]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs
Rollup merge of #107108 - sulami:issue-83968-doc-alias-typo-suggestions, r=compiler...
[rust.git] / tests / ui / async-await / multiple-lifetimes / ret-impl-trait-fg.rs
1 // edition:2018
2 // run-pass
3
4 // Test member constraints that appear in the `impl Trait`
5 // return type of an async function.
6 // (This used to require a feature gate.)
7
8 trait Trait<'a, 'b> { }
9 impl<T> Trait<'_, '_> for T { }
10
11 async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
12     (a, b)
13 }
14
15 fn main() {
16     let _ = async_ret_impl_trait(&22, &44);
17 }