]> git.proxmox.com Git - rustc.git/blame - src/test/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs
New upstream version 1.58.1+dfsg1
[rustc.git] / src / test / ui / parser / issues / issue-87217-keyword-order / const-async-const.rs
CommitLineData
94222f64
XL
1// edition:2018
2
3// Test that even when `const` is already present, the proposed fix is `const const async`,
4// like for `pub pub`.
5
6const async const fn test() {}
7//~^ ERROR expected one of `extern`, `fn`, or `unsafe`, found keyword `const`
8//~| NOTE expected one of `extern`, `fn`, or `unsafe`
9//~| HELP `const` must come before `async`
10//~| SUGGESTION const async
11//~| NOTE keyword order for functions declaration is `default`, `pub`, `const`, `async`, `unsafe`, `extern`