]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/no-const-fn-in-extern-block.stderr
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
[rust.git] / src / test / ui / parser / no-const-fn-in-extern-block.stderr
1 error: functions in `extern` blocks cannot have qualifiers
2   --> $DIR/no-const-fn-in-extern-block.rs:2:14
3    |
4 LL | extern "C" {
5    | ---------- in this `extern` block
6 LL |     const fn foo();
7    |              ^^^
8    |
9 help: remove the qualifiers
10    |
11 LL |     fn foo();
12    |     ^^
13
14 error: functions in `extern` blocks cannot have qualifiers
15   --> $DIR/no-const-fn-in-extern-block.rs:4:21
16    |
17 LL | extern "C" {
18    | ---------- in this `extern` block
19 ...
20 LL |     const unsafe fn bar();
21    |                     ^^^
22    |
23 help: remove the qualifiers
24    |
25 LL |     fn bar();
26    |     ^^
27
28 error: aborting due to 2 previous errors
29