]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-async-await.rs
9cfefef4129de27e3e9e957db9099df93f6957fd
[rust.git] / src / test / ui / feature-gates / feature-gate-async-await.rs
1 // edition:2018
2
3 struct S;
4
5 impl S {
6     async fn foo() {} //~ ERROR async fn is unstable
7 }
8
9 trait T {
10     async fn foo(); //~ ERROR trait fns cannot be declared `async`
11     //~^ ERROR async fn is unstable
12 }
13
14 async fn foo() {} //~ ERROR async fn is unstable
15
16 fn main() {
17     let _ = async {}; //~ ERROR async blocks are unstable
18     let _ = async || {}; //~ ERROR async closures are unstable
19 }