Files
rust/tests/ui/extern/issue-95829.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
949 B
Plaintext
Raw Normal View History

error: incorrect function inside `extern` block
--> $DIR/issue-95829.rs:4:14
|
2024-10-31 11:39:45 +01:00
LL | extern "C" {
| ---------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body
LL | async fn L() {
| ______________^___-
| | |
| | cannot have a body
LL | |
LL | | async fn M() {}
LL | | }
| |_____- help: remove the invalid body: `;`
|
= 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
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
2024-10-11 11:30:03 -04:00
error: functions in `extern` blocks cannot have `async` qualifier
--> $DIR/issue-95829.rs:4:5
|
2024-10-31 11:39:45 +01:00
LL | extern "C" {
| ---------- in this `extern` block
LL | async fn L() {
2024-10-11 11:30:03 -04:00
| ^^^^^ help: remove the `async` qualifier
error: aborting due to 2 previous errors