]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs
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 async
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 `async unsafe`
13 //~| SUGGESTION const async unsafe
14 //~| NOTE keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`