]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/in-trait/fn-not-async-err.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / async-await / in-trait / fn-not-async-err.rs
CommitLineData
2b03887a
FG
1// edition: 2021
2
3#![feature(async_fn_in_trait)]
4#![allow(incomplete_features)]
5
6trait MyTrait {
7 async fn foo(&self) -> i32;
8}
9
10impl MyTrait for i32 {
11 fn foo(&self) -> i32 {
12 //~^ ERROR: `i32` is not a future [E0277]
13 *self
14 }
15}
16
17fn main() {}