]> git.lizzy.rs Git - rust.git/blob - tests/ui/extern/not-in-block.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / extern / not-in-block.stderr
1 error: free function without a body
2   --> $DIR/not-in-block.rs:3:1
3    |
4 LL | extern fn none_fn(x: bool) -> i32;
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7 help: provide a definition for the function
8    |
9 LL | extern fn none_fn(x: bool) -> i32 { <body> }
10    |                                   ~~~~~~~~~~
11 help: if you meant to declare an externally defined function, use an `extern` block
12    |
13 LL | extern { fn none_fn(x: bool) -> i32; }
14    | ~~~~~~~~                             +
15
16 error: free function without a body
17   --> $DIR/not-in-block.rs:5:1
18    |
19 LL | extern "C" fn c_fn(x: bool) -> i32;
20    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21    |
22 help: provide a definition for the function
23    |
24 LL | extern "C" fn c_fn(x: bool) -> i32 { <body> }
25    |                                    ~~~~~~~~~~
26 help: if you meant to declare an externally defined function, use an `extern` block
27    |
28 LL | extern "C" { fn c_fn(x: bool) -> i32; }
29    | ~~~~~~~~~~~~                          +
30
31 error: aborting due to 2 previous errors
32