gccrs: Handle `async` functions in traits
[official-gcc.git] / gcc / testsuite / rust / compile / issue-2785.rs
blob08f6346f60b2268db4c3f91d4068ba91909a1c22
1 // { dg-additional-options "-frust-edition=2018" }
2 trait Foo {
3     async fn foo(){}
4     // { dg-error "functions in traits cannot be declared .async." "" { target *-*-* } .-1 }
5     async fn bar();
6     // { dg-error "functions in traits cannot be declared .async." "" { target *-*-* } .-1 }
9 fn main() {}