gcc/testsuite/rust/compile/issue-2785.rs
raw| 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 } |
| 7 | } |
| 8 | |
| 9 | fn main() {} |