]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/in-trait/fn-not-async-err.rs
Rollup merge of #105459 - jyn514:proc-macro-default, r=Mark-Simulacrum
[rust.git] / src / test / ui / async-await / in-trait / fn-not-async-err.rs
1 // edition: 2021
2
3 #![feature(async_fn_in_trait)]
4 #![allow(incomplete_features)]
5
6 trait MyTrait {
7     async fn foo(&self) -> i32;
8 }
9
10 impl MyTrait for i32 {
11     fn foo(&self) -> i32 {
12         //~^ ERROR: `i32` is not a future [E0277]
13         *self
14     }
15 }
16
17 fn main() {}