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

ices/91370.rs: fixed with errors #1082

Merged
merged 1 commit into from
Jan 10, 2022
Merged

ices/91370.rs: fixed with errors #1082

merged 1 commit into from
Jan 10, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#91370

extern {
    fn r() {
        impl Copy for u8 {}
    }
}

pub fn main() {}
=== stdout ===
=== stderr ===
error: incorrect function inside `extern` block
 --> /home/runner/work/glacier/glacier/ices/91370.rs:2:8
  |
1 |   extern {
  |   ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
2 |       fn r() {
  |  ________^___-
  | |        |
  | |        cannot have a body
3 | |         impl Copy for u8 {}
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: aborting due to previous error

==============

=== stdout ===
=== stderr ===
error: incorrect function inside `extern` block
 --> /home/runner/work/glacier/glacier/ices/91370.rs:2:8
  |
1 |   extern {
  |   ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
2 |       fn r() {
  |  ________^___-
  | |        |
  | |        cannot have a body
3 | |         impl Copy for u8 {}
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: aborting due to previous error

==============
@Alexendoo Alexendoo merged commit 0f4cfc5 into master Jan 10, 2022
@Alexendoo Alexendoo deleted the autofix/ices/91370.rs branch January 10, 2022 12:16
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