rust/tests/ui/async-await/async-trait-fn.rs
2023-01-11 09:32:08 +00:00

12 lines
344 B
Rust

// edition:2018
trait T {
async fn foo() {} //~ ERROR functions in traits cannot be declared `async`
async fn bar(&self) {} //~ ERROR functions in traits cannot be declared `async`
async fn baz() { //~ ERROR functions in traits cannot be declared `async`
// Nested item must not ICE.
fn a() {}
}
}
fn main() {}