]>
Commit | Line | Data |
---|---|---|
94222f64 XL |
1 | // edition:2018 |
2 | ||
3 | // There is an order to respect for keywords before a function: | |
4 | // `<visibility>, const, async, unsafe, extern, "<ABI>"` | |
5 | // | |
6 | // This test ensures the compiler is helpful about them being misplaced. | |
7 | // Visibilities are tested elsewhere. | |
8 | ||
9 | unsafe async fn test() {} | |
10 | //~^ ERROR expected one of `extern` or `fn`, found keyword `async` | |
11 | //~| NOTE expected one of `extern` or `fn` | |
12 | //~| HELP `async` must come before `unsafe` | |
13 | //~| SUGGESTION async unsafe | |
14 | //~| NOTE keyword order for functions declaration is `default`, `pub`, `const`, `async`, `unsafe`, `extern` |