]> git.proxmox.com Git - rustc.git/blame - tests/ui/foreign/issue-91370-foreign-fn-block-impl.stderr
New upstream version 1.76.0+dfsg1
[rustc.git] / tests / ui / foreign / issue-91370-foreign-fn-block-impl.stderr
CommitLineData
5099ac24
FG
1error: incorrect function inside `extern` block
2 --> $DIR/issue-91370-foreign-fn-block-impl.rs:5:8
3 |
4LL | extern {
5 | ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
6LL |
7LL | fn f() {
8 | ________^___-
9 | | |
10 | | cannot have a body
11LL | |
12LL | |
13LL | | impl Copy for u8 {}
14LL | | }
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 20error: aborting due to 1 previous error
5099ac24 21