Files
rust/tests/ui/argument-suggestions/issue-109831.stderr
Esteban Küber f0845adb0c Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```
2025-02-10 20:21:39 +00:00

53 lines
1.3 KiB
Plaintext

error[E0412]: cannot find type `C` in this scope
--> $DIR/issue-109831.rs:4:24
|
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: C) {}
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
--> $DIR/issue-109831.rs:7:16
|
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
--> $DIR/issue-109831.rs:7:5
|
LL | f(A, A, B, C);
| ^ - - - unexpected argument #4
| | |
| | expected `B`, found `A`
| expected `B`, found `A`
|
note: function defined here
--> $DIR/issue-109831.rs:4:4
|
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`.