summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr
blob: 4c55179ce2379b00c1adc7bf2b64c9eb2ffa86fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
error: expected one of `extern`, `fn`, or `unsafe`, found keyword `const`
  --> $DIR/const-async-const.rs:5:13
   |
LL | const async const fn test() {}
   |             ^^^^^
   |             |
   |             expected one of `extern`, `fn`, or `unsafe`
   |             help: `const` already used earlier, remove this one
   |
note: `const` first seen here
  --> $DIR/const-async-const.rs:5:1
   |
LL | const async const fn test() {}
   | ^^^^^

error: functions cannot be both `const` and `async`
  --> $DIR/const-async-const.rs:5:1
   |
LL | const async const fn test() {}
   | ^^^^^-^^^^^-------------------
   | |     |
   | |     `async` because of this
   | `const` because of this

error: aborting due to 2 previous errors