Files
rust/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
510 B
Rust
Raw Normal View History

//@ edition:2018
2021-10-24 15:11:11 +02:00
// Test that even when `const` is already present, the proposed fix is to remove the second `const`
const async const fn test() {}
//~^ ERROR expected one of `extern`, `fn`, or `unsafe`, found keyword `const`
//~| NOTE expected one of `extern`, `fn`, or `unsafe`
2021-10-24 15:11:11 +02:00
//~| HELP `const` already used earlier, remove this one
//~| NOTE `const` first seen here
//~| ERROR functions cannot be both `const` and `async`
//~| NOTE `const` because of this
//~| NOTE `async` because of this
fn main() {}