]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/in-trait/early.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / impl-trait / in-trait / early.rs
1 // check-pass
2 // edition:2021
3
4 #![feature(async_fn_in_trait, return_position_impl_trait_in_trait)]
5 #![allow(incomplete_features)]
6
7 pub trait Foo {
8     async fn bar<'a: 'a>(&'a mut self);
9 }
10
11 impl Foo for () {
12     async fn bar<'a: 'a>(&'a mut self) {}
13 }
14
15 pub trait Foo2 {
16     fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a;
17 }
18
19 impl Foo2 for () {
20     fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a {}
21 }
22
23 fn main() {}