]> git.lizzy.rs Git - rust.git/blob - src/test/ui/argument-suggestions/basic.stderr
Rollup merge of #95376 - WaffleLapkin:drain_keep_rest, r=dtolnay
[rust.git] / src / test / ui / argument-suggestions / basic.stderr
1 error[E0308]: mismatched types
2   --> $DIR/basic.rs:20:13
3    |
4 LL |     invalid(1.0);
5    |     ------- ^^^ expected `u32`, found floating-point number
6    |     |
7    |     arguments to this function are incorrect
8    |
9 note: function defined here
10   --> $DIR/basic.rs:13:4
11    |
12 LL | fn invalid(_i: u32) {}
13    |    ^^^^^^^ -------
14
15 error[E0061]: this function takes 0 arguments but 1 argument was supplied
16   --> $DIR/basic.rs:21:5
17    |
18 LL |     extra("");
19    |     ^^^^^ -- argument of type `&'static str` unexpected
20    |
21 note: function defined here
22   --> $DIR/basic.rs:14:4
23    |
24 LL | fn extra() {}
25    |    ^^^^^
26 help: remove the extra argument
27    |
28 LL |     extra();
29    |     ~~~~~~~
30
31 error[E0061]: this function takes 1 argument but 0 arguments were supplied
32   --> $DIR/basic.rs:22:5
33    |
34 LL |     missing();
35    |     ^^^^^^^-- an argument of type `u32` is missing
36    |
37 note: function defined here
38   --> $DIR/basic.rs:15:4
39    |
40 LL | fn missing(_i: u32) {}
41    |    ^^^^^^^ -------
42 help: provide the argument
43    |
44 LL |     missing(/* u32 */);
45    |     ~~~~~~~~~~~~~~~~~~
46
47 error[E0308]: arguments to this function are incorrect
48   --> $DIR/basic.rs:23:5
49    |
50 LL |     swapped("", 1);
51    |     ^^^^^^^ --  - expected `&str`, found `{integer}`
52    |             |
53    |             expected `u32`, found `&'static str`
54    |
55 note: function defined here
56   --> $DIR/basic.rs:16:4
57    |
58 LL | fn swapped(_i: u32, _s: &str) {}
59    |    ^^^^^^^ -------  --------
60 help: swap these arguments
61    |
62 LL |     swapped(1, "");
63    |     ~~~~~~~~~~~~~~
64
65 error[E0308]: arguments to this function are incorrect
66   --> $DIR/basic.rs:24:5
67    |
68 LL |     permuted(Y {}, Z {}, X {});
69    |     ^^^^^^^^ ----  ----  ---- expected `Z`, found `X`
70    |              |     |
71    |              |     expected `Y`, found `Z`
72    |              expected `X`, found `Y`
73    |
74 note: function defined here
75   --> $DIR/basic.rs:17:4
76    |
77 LL | fn permuted(_x: X, _y: Y, _z: Z) {}
78    |    ^^^^^^^^ -----  -----  -----
79 help: reorder these arguments
80    |
81 LL |     permuted(X {}, Y {}, Z {});
82    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~
83
84 error[E0057]: this function takes 1 argument but 0 arguments were supplied
85   --> $DIR/basic.rs:27:5
86    |
87 LL |     closure();
88    |     ^^^^^^^-- an argument is missing
89    |
90 note: closure defined here
91   --> $DIR/basic.rs:26:19
92    |
93 LL |     let closure = |x| x;
94    |                   ^^^
95 help: provide the argument
96    |
97 LL |     closure(/* value */);
98    |     ~~~~~~~~~~~~~~~~~~~~
99
100 error: aborting due to 6 previous errors
101
102 Some errors have detailed explanations: E0057, E0061, E0308.
103 For more information about an error, try `rustc --explain E0057`.