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

ices/97484.rs: fixed with errors #1296

Merged
merged 1 commit into from
Jun 10, 2022
Merged

ices/97484.rs: fixed with errors #1296

merged 1 commit into from
Jun 10, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#97484

struct A;
struct B;
struct C;
struct D;
struct E;
struct F;
struct G;

fn foo(a: &A, d: D, e: &E, g: G) {}

fn main() {
    foo(&&A, B, C, D, E, F, G);
}
=== stdout ===
=== stderr ===
error[E0061]: this function takes 4 arguments but 7 arguments were supplied
  --> /home/runner/work/glacier/glacier/ices/97484.rs:12:5
   |
12 |     foo(&&A, B, C, D, E, F, G);
   |     ^^^      -  -        - argument unexpected
   |              |  |
   |              |  argument of type `&E` unexpected
   |              argument of type `D` unexpected
   |
note: function defined here
  --> /home/runner/work/glacier/glacier/ices/97484.rs:9:4
   |
9  | fn foo(a: &A, d: D, e: &E, g: G) {}
   |    ^^^ -----  ----  -----  ----
help: consider removing the ``
   |
12 -     foo(&&A, B, C, D, E, F, G);
12 +     foo(&&A, B, C, D, E, F, G);
   | 
help: remove the extra arguments
   |
12 |     foo(&&A, D, {&E}, G);
   |     ~~~~~~~~~~~~~~~~~~~~

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0061]: this function takes 4 arguments but 7 arguments were supplied
  --> /home/runner/work/glacier/glacier/ices/97484.rs:12:5
   |
12 |     foo(&&A, B, C, D, E, F, G);
   |     ^^^      -  -        - argument unexpected
   |              |  |
   |              |  argument of type `&E` unexpected
   |              argument of type `D` unexpected
   |
note: function defined here
  --> /home/runner/work/glacier/glacier/ices/97484.rs:9:4
   |
9  | fn foo(a: &A, d: D, e: &E, g: G) {}
   |    ^^^ -----  ----  -----  ----
help: consider removing the ``
   |
12 -     foo(&&A, B, C, D, E, F, G);
12 +     foo(&&A, B, C, D, E, F, G);
   | 
help: remove the extra arguments
   |
12 |     foo(&&A, D, {&E}, G);
   |     ~~~~~~~~~~~~~~~~~~~~

error: aborting due to previous error

For more information about this error, try `rustc --explain E0061`.
==============
@JohnTitor JohnTitor merged commit 3f86df2 into master Jun 10, 2022
@JohnTitor JohnTitor deleted the autofix/ices/97484.rs branch June 10, 2022 03:44
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.

None yet

2 participants