]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/in-trait/async-example-desugared.rs
Auto merge of #104616 - RalfJung:ctfe-alignment, r=oli-obk,RalfJung
[rust.git] / src / test / ui / async-await / in-trait / async-example-desugared.rs
1 // check-pass
2 // edition: 2021
3
4 #![feature(async_fn_in_trait)]
5 #![feature(return_position_impl_trait_in_trait)]
6 #![allow(incomplete_features)]
7
8 use std::future::Future;
9
10 trait MyTrait {
11     async fn foo(&self) -> i32;
12 }
13
14 impl MyTrait for i32 {
15     fn foo(&self) -> impl Future<Output = i32> + '_ {
16         async { *self }
17     }
18 }
19
20 fn main() {}