1 // compile-flags: -Wrust-2021-incompatible-closure-captures
6 async fn create(path: impl AsRef<std::path::Path>) { //~ ERROR `async fn` is not permitted in Rust 2015
7 //~^ WARN changes to closure capture in Rust 2021 will affect drop order [rust_2021_incompatible_closure_captures]
9 crate(move || {} ).await //~ ERROR expected function, found module `crate`
13 trait C{async fn new(val: T) {} //~ ERROR `async fn` is not permitted in Rust 2015
14 //~^ ERROR functions in traits cannot be declared `async`
15 //~| ERROR cannot find type `T` in this scope
16 //~| WARN changes to closure capture in Rust 2021 will affect drop order [rust_2021_incompatible_closure_captures]
18 //~ ERROR this file contains an unclosed delimiter