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