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

ices/98897.rs: fixed with errors #1337

Merged
merged 1 commit into from
Jul 11, 2022
Merged

ices/98897.rs: fixed with errors #1337

merged 1 commit into from
Jul 11, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#98897

pub fn main() {
    (|_, ()| ())([return, ()]);
}
=== stdout ===
=== stderr ===
warning: unreachable expression
 --> /home/runner/work/glacier/glacier/ices/98897.rs:2:27
  |
2 |     (|_, ()| ())([return, ()]);
  |                   ------  ^^ unreachable expression
  |                   |
  |                   any code following this expression is unreachable
  |
  = note: `#[warn(unreachable_code)]` on by default

error[E0057]: this function takes 2 arguments but 1 argument was supplied
 --> /home/runner/work/glacier/glacier/ices/98897.rs:2:5
  |
2 |     (|_, ()| ())([return, ()]);
  |     ^^^^^^^^^^^^-------------- an argument of type `()` is missing
  |
note: closure defined here
 --> /home/runner/work/glacier/glacier/ices/98897.rs:2:6
  |
2 |     (|_, ()| ())([return, ()]);
  |      ^^^^^^^
help: provide the argument
  |
2 |     (|_, ()| ())([return, ()], ());
  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: unreachable expression
 --> /home/runner/work/glacier/glacier/ices/98897.rs:2:27
  |
2 |     (|_, ()| ())([return, ()]);
  |                   ------  ^^ unreachable expression
  |                   |
  |                   any code following this expression is unreachable
  |
  = note: `#[warn(unreachable_code)]` on by default

error[E0057]: this function takes 2 arguments but 1 argument was supplied
 --> /home/runner/work/glacier/glacier/ices/98897.rs:2:5
  |
2 |     (|_, ()| ())([return, ()]);
  |     ^^^^^^^^^^^^-------------- an argument of type `()` is missing
  |
note: closure defined here
 --> /home/runner/work/glacier/glacier/ices/98897.rs:2:6
  |
2 |     (|_, ()| ())([return, ()]);
  |      ^^^^^^^
help: provide the argument
  |
2 |     (|_, ()| ())([return, ()], ());
  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0057`.
==============
@Alexendoo Alexendoo merged commit 5195146 into master Jul 11, 2022
@Alexendoo Alexendoo deleted the autofix/ices/98897.rs branch July 11, 2022 11:28
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants