]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/fn-body-optional-semantic-fail.stderr
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / parser / fn-body-optional-semantic-fail.stderr
1 error: free function without a body
2 --> $DIR/fn-body-optional-semantic-fail.rs:4:5
3 |
4 LL | fn f1();
5 | ^^^^^^^-
6 | |
7 | help: provide a definition for the function: `{ <body> }`
8
9 error: associated function in `impl` without body
10 --> $DIR/fn-body-optional-semantic-fail.rs:14:9
11 |
12 LL | fn f1();
13 | ^^^^^^^-
14 | |
15 | help: provide a definition for the function: `{ <body> }`
16
17 error: associated function in `impl` without body
18 --> $DIR/fn-body-optional-semantic-fail.rs:19:9
19 |
20 LL | fn f3();
21 | ^^^^^^^-
22 | |
23 | help: provide a definition for the function: `{ <body> }`
24
25 error: incorrect function inside `extern` block
26 --> $DIR/fn-body-optional-semantic-fail.rs:25:12
27 |
28 LL | extern {
29 | ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
30 LL | fn f5(); // OK.
31 LL | fn f6() {}
32 | ^^ -- help: remove the invalid body: `;`
33 | |
34 | cannot have a body
35 |
36 = help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
37 = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
38
39 error: aborting due to 4 previous errors
40