rust/tests/ui/argument-suggestions/basic.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

108 lines
2.5 KiB
Text

error[E0308]: mismatched types
--> $DIR/basic.rs:20:13
|
LL | invalid(1.0);
| ------- ^^^ expected `u32`, found floating-point number
| |
| arguments to this function are incorrect
|
note: function defined here
--> $DIR/basic.rs:13:4
|
LL | fn invalid(_i: u32) {}
| ^^^^^^^ -------
error[E0061]: this function takes 0 arguments but 1 argument was supplied
--> $DIR/basic.rs:21:5
|
LL | extra("");
| ^^^^^ -- unexpected argument of type `&'static str`
|
note: function defined here
--> $DIR/basic.rs:14:4
|
LL | fn extra() {}
| ^^^^^
help: remove the extra argument
|
LL - extra("");
LL + extra();
|
error[E0061]: this function takes 1 argument but 0 arguments were supplied
--> $DIR/basic.rs:22:5
|
LL | missing();
| ^^^^^^^-- argument #1 of type `u32` is missing
|
note: function defined here
--> $DIR/basic.rs:15:4
|
LL | fn missing(_i: u32) {}
| ^^^^^^^ -------
help: provide the argument
|
LL - missing();
LL + missing(/* u32 */);
|
error[E0308]: arguments to this function are incorrect
--> $DIR/basic.rs:23:5
|
LL | swapped("", 1);
| ^^^^^^^ -- - expected `&str`, found `{integer}`
| |
| expected `u32`, found `&'static str`
|
note: function defined here
--> $DIR/basic.rs:16:4
|
LL | fn swapped(_i: u32, _s: &str) {}
| ^^^^^^^
help: swap these arguments
|
LL - swapped("", 1);
LL + swapped(1, "");
|
error[E0308]: arguments to this function are incorrect
--> $DIR/basic.rs:24:5
|
LL | permuted(Y {}, Z {}, X {});
| ^^^^^^^^ ---- ---- ---- expected `Z`, found `X`
| | |
| | expected `Y`, found `Z`
| expected `X`, found `Y`
|
note: function defined here
--> $DIR/basic.rs:17:4
|
LL | fn permuted(_x: X, _y: Y, _z: Z) {}
| ^^^^^^^^
help: reorder these arguments
|
LL - permuted(Y {}, Z {}, X {});
LL + permuted(X {}, Y {}, Z {});
|
error[E0057]: this function takes 1 argument but 0 arguments were supplied
--> $DIR/basic.rs:27:5
|
LL | closure();
| ^^^^^^^-- argument #1 is missing
|
note: closure defined here
--> $DIR/basic.rs:26:19
|
LL | let closure = |x| x;
| ^^^
help: provide the argument
|
LL - closure();
LL + closure(/* x */);
|
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0057, E0061, E0308.
For more information about an error, try `rustc --explain E0057`.