]> git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/async-trait-fn.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / async-await / async-trait-fn.rs
1 // edition:2018
2 trait T {
3 async fn foo() {} //~ ERROR functions in traits cannot be declared `async`
4 //~^ ERROR mismatched types
5 async fn bar(&self) {} //~ ERROR functions in traits cannot be declared `async`
6 //~^ ERROR mismatched types
7 async fn baz() { //~ ERROR functions in traits cannot be declared `async`
8 //~^ ERROR mismatched types
9 // Nested item must not ICE.
10 fn a() {}
11 }
12 }
13
14 fn main() {}