]> git.lizzy.rs Git - rust.git/blob - tests/ui/foreign/issue-91370-foreign-fn-block-impl.stderr
Rollup merge of #105526 - Xiretza:iter-from-generator-derive, r=scottmcm
[rust.git] / tests / ui / foreign / issue-91370-foreign-fn-block-impl.stderr
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
20 error: aborting due to previous error
21