rust/tests/ui/async-await/async-trait-fn.rs

13 lines
345 B
Rust
Raw Normal View History

2019-11-18 14:08:03 -06:00
// edition:2018
2019-11-18 14:08:03 -06:00
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`
2021-04-15 14:41:40 -05:00
async fn baz() { //~ ERROR functions in traits cannot be declared `async`
// Nested item must not ICE.
fn a() {}
}
2019-11-18 14:08:03 -06:00
}
fn main() {}