]>
Commit | Line | Data |
---|---|---|
5099ac24 FG |
1 | error: incorrect function inside `extern` block |
2 | --> $DIR/issue-91370-foreign-fn-block-impl.rs:5:8 | |
3 | | | |
4 | LL | extern { | |
5 | | ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body | |
6 | LL | | |
7 | LL | fn f() { | |
8 | | ________^___- | |
9 | | | | | |
10 | | | cannot have a body | |
11 | LL | | | |
12 | LL | | | |
13 | LL | | impl Copy for u8 {} | |
14 | LL | | } | |
15 | | |_____- help: remove the invalid body: `;` | |
16 | | | |
17 | = 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 | |
18 | = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html | |
19 | ||
4b012472 | 20 | error: aborting due to 1 previous error |
5099ac24 | 21 |