Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/95829.rs: fixed with errors #1345

Merged
merged 1 commit into from
Jul 16, 2022
Merged

ices/95829.rs: fixed with errors #1345

merged 1 commit into from
Jul 16, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#95829

extern {
    async fn L() {
        async fn M() {}
    }
}
=== stdout ===
=== stderr ===
error: incorrect function inside `extern` block
 --> /home/runner/work/glacier/glacier/ices/95829.rs:2:14
  |
1 |   extern {
  |   ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
2 |       async fn L() {
  |  ______________^___-
  | |              |
  | |              cannot have a body
3 | |         async fn M() {}
4 | |     }
  | |_____- 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

error: functions in `extern` blocks cannot have qualifiers
 --> /home/runner/work/glacier/glacier/ices/95829.rs:2:14
  |
1 | extern {
  | ------ in this `extern` block
2 |     async fn L() {
  |              ^
  |
help: remove the qualifiers
  |
2 |     fn L() {
  |     ~~

error[E0601]: `main` function not found in crate `95829`
 --> /home/runner/work/glacier/glacier/ices/95829.rs:5:2
  |
5 | }
  |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/95829.rs`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0601`.
==============

=== stdout ===
=== stderr ===
error: incorrect function inside `extern` block
 --> /home/runner/work/glacier/glacier/ices/95829.rs:2:14
  |
1 |   extern {
  |   ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
2 |       async fn L() {
  |  ______________^___-
  | |              |
  | |              cannot have a body
3 | |         async fn M() {}
4 | |     }
  | |_____- 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

error: functions in `extern` blocks cannot have qualifiers
 --> /home/runner/work/glacier/glacier/ices/95829.rs:2:14
  |
1 | extern {
  | ------ in this `extern` block
2 |     async fn L() {
  |              ^
  |
help: remove the qualifiers
  |
2 |     fn L() {
  |     ~~

error[E0601]: `main` function not found in crate `95829`
 --> /home/runner/work/glacier/glacier/ices/95829.rs:5:2
  |
5 | }
  |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/95829.rs`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0601`.
==============
@JohnTitor JohnTitor merged commit b152225 into master Jul 16, 2022
@JohnTitor JohnTitor deleted the autofix/ices/95829.rs branch July 16, 2022 03:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants