mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
103 lines
2.6 KiB
Plaintext
103 lines
2.6 KiB
Plaintext
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`
|
|
| help: remove the extra argument
|
|
|
|
|
note: function defined here
|
|
--> $DIR/basic.rs:14:4
|
|
|
|
|
LL | fn extra() {}
|
|
| ^^^^^
|
|
|
|
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
|
--> $DIR/basic.rs:22:5
|
|
|
|
|
LL | missing();
|
|
| ^^^^^^^-- an argument 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(/* 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, "");
|
|
| ~~~~~~~
|
|
|
|
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(X {}, Y {}, Z {});
|
|
| ~~~~~~~~~~~~~~~~~~
|
|
|
|
error[E0057]: this function takes 1 argument but 0 arguments were supplied
|
|
--> $DIR/basic.rs:27:5
|
|
|
|
|
LL | closure();
|
|
| ^^^^^^^-- an argument is missing
|
|
|
|
|
note: closure defined here
|
|
--> $DIR/basic.rs:26:19
|
|
|
|
|
LL | let closure = |x| x;
|
|
| ^^^
|
|
help: provide the argument
|
|
|
|
|
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`.
|