]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/in-trait/async-example-desugared-in-trait.rs
drive-by: Fix path spans
[rust.git] / src / test / ui / async-await / in-trait / async-example-desugared-in-trait.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     fn foo(&self) -> impl Future<Output = i32> + '_;
12 }
13
14 impl MyTrait for i32 {
15     // This will break once a PR that implements #102745 is merged
16     async fn foo(&self) -> i32 {
17         *self
18     }
19 }
20
21 fn main() {}