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

ices/97193.rs: fixed with errors #1267

Merged
merged 1 commit into from
May 23, 2022
Merged

ices/97193.rs: fixed with errors #1267

merged 1 commit into from
May 23, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#97193

extern  {
    fn a(&mut self)  {
    fn b(buf: &Self) {
}
=== stdout ===
=== stderr ===
error: this file contains an unclosed delimiter
 --> /home/runner/work/glacier/glacier/ices/97193.rs:4:3
  |
1 | extern  {
  |         - unclosed delimiter
2 |     fn a(&mut self)  {
  |                      - unclosed delimiter
3 |     fn b(buf: &Self) {
  |                      - this delimiter might not be properly closed...
4 | }
  | - ^
  | |
  | ...as it matches this but it has different indentation

error: incorrect function inside `extern` block
 --> /home/runner/work/glacier/glacier/ices/97193.rs:2:8
  |
1 |   extern  {
  |   ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
2 |       fn a(&mut self)  {
  |  ________^_____________-
  | |        |
  | |        cannot have a body
3 | |     fn b(buf: &Self) {
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: `self` parameter is only allowed in associated functions
 --> /home/runner/work/glacier/glacier/ices/97193.rs:2:10
  |
2 |     fn a(&mut self)  {
  |          ^^^^^^^^^ not semantically valid as function parameter
  |
  = note: associated functions are those in `impl` or `trait` definitions

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error: this file contains an unclosed delimiter
 --> /home/runner/work/glacier/glacier/ices/97193.rs:4:3
  |
1 | extern  {
  |         - unclosed delimiter
2 |     fn a(&mut self)  {
  |                      - unclosed delimiter
3 |     fn b(buf: &Self) {
  |                      - this delimiter might not be properly closed...
4 | }
  | - ^
  | |
  | ...as it matches this but it has different indentation

error: incorrect function inside `extern` block
 --> /home/runner/work/glacier/glacier/ices/97193.rs:2:8
  |
1 |   extern  {
  |   ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
2 |       fn a(&mut self)  {
  |  ________^_____________-
  | |        |
  | |        cannot have a body
3 | |     fn b(buf: &Self) {
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: `self` parameter is only allowed in associated functions
 --> /home/runner/work/glacier/glacier/ices/97193.rs:2:10
  |
2 |     fn a(&mut self)  {
  |          ^^^^^^^^^ not semantically valid as function parameter
  |
  = note: associated functions are those in `impl` or `trait` definitions

error: aborting due to 3 previous errors

==============
@JohnTitor JohnTitor merged commit 5320894 into master May 23, 2022
@JohnTitor JohnTitor deleted the autofix/ices/97193.rs branch May 23, 2022 12:33
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