rust/tests/ui/argument-suggestions/issue-109831.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-04-02 02:48:01 +00:00
error[E0412]: cannot find type `C` in this scope
2023-04-02 03:41:50 +00:00
--> $DIR/issue-109831.rs:4:24
2023-04-02 02:48:01 +00:00
|
LL | struct A;
| --------- similarly named struct `A` defined here
...
LL | fn f(b1: B, b2: B, a2: C) {}
| ^
|
help: a struct with a similar name exists
|
LL | fn f(b1: B, b2: B, a2: A) {}
| ~
help: you might be missing a type parameter
|
LL | fn f<C>(b1: B, b2: B, a2: C) {}
| +++
error[E0425]: cannot find value `C` in this scope
2023-04-02 03:41:50 +00:00
--> $DIR/issue-109831.rs:7:16
2023-04-02 02:48:01 +00:00
|
LL | struct A;
| --------- similarly named unit struct `A` defined here
...
LL | f(A, A, B, C);
| ^ help: a unit struct with a similar name exists: `A`
error[E0061]: this function takes 3 arguments but 4 arguments were supplied
2023-04-02 03:41:50 +00:00
--> $DIR/issue-109831.rs:7:5
2023-04-02 02:48:01 +00:00
|
LL | f(A, A, B, C);
| ^ - - - unexpected argument
| | |
| | expected `B`, found `A`
| expected `B`, found `A`
|
note: function defined here
2023-04-02 03:41:50 +00:00
--> $DIR/issue-109831.rs:4:4
2023-04-02 02:48:01 +00:00
|
LL | fn f(b1: B, b2: B, a2: C) {}
| ^ ----- ----- -----
help: remove the extra argument
|
LL - f(A, A, B, C);
LL + f(/* B */, /* B */, B);
|
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0061, E0412, E0425.
For more information about an error, try `rustc --explain E0061`.