]> git.lizzy.rs Git - rust.git/blob - src/test/ui/argument-suggestions/extra_arguments.stderr
Merge commit '63734fcdd718cca089f84c42f3a42c0096cfd431' into sync_cg_clif-2022-05-15
[rust.git] / src / test / ui / argument-suggestions / extra_arguments.stderr
1 error[E0061]: this function takes 0 arguments but 1 argument was supplied
2   --> $DIR/extra_arguments.rs:7:3
3    |
4 LL |   empty("");
5    |   ^^^^^ -- argument unexpected
6    |
7 note: function defined here
8   --> $DIR/extra_arguments.rs:1:4
9    |
10 LL | fn empty() {}
11    |    ^^^^^
12 help: remove the extra argument
13    |
14 LL |   empty();
15    |   ~~~~~~~
16
17 error[E0061]: this function takes 1 argument but 2 arguments were supplied
18   --> $DIR/extra_arguments.rs:9:3
19    |
20 LL |   one_arg(1, 1);
21    |   ^^^^^^^    - argument unexpected
22    |
23 note: function defined here
24   --> $DIR/extra_arguments.rs:2:4
25    |
26 LL | fn one_arg(_a: i32) {}
27    |    ^^^^^^^ -------
28 help: remove the extra argument
29    |
30 LL |   one_arg(1);
31    |   ~~~~~~~~~~
32
33 error[E0061]: this function takes 1 argument but 2 arguments were supplied
34   --> $DIR/extra_arguments.rs:10:3
35    |
36 LL |   one_arg(1, "");
37    |   ^^^^^^^    -- argument unexpected
38    |
39 note: function defined here
40   --> $DIR/extra_arguments.rs:2:4
41    |
42 LL | fn one_arg(_a: i32) {}
43    |    ^^^^^^^ -------
44 help: remove the extra argument
45    |
46 LL |   one_arg(1);
47    |   ~~~~~~~~~~
48
49 error[E0061]: this function takes 1 argument but 3 arguments were supplied
50   --> $DIR/extra_arguments.rs:11:3
51    |
52 LL |   one_arg(1, "", 1.0);
53    |   ^^^^^^^    --  --- argument unexpected
54    |              |
55    |              argument unexpected
56    |
57 note: function defined here
58   --> $DIR/extra_arguments.rs:2:4
59    |
60 LL | fn one_arg(_a: i32) {}
61    |    ^^^^^^^ -------
62 help: remove the extra arguments
63    |
64 LL |   one_arg(1);
65    |   ~~~~~~~~~~
66
67 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
68   --> $DIR/extra_arguments.rs:13:3
69    |
70 LL |   two_arg_same(1, 1, 1);
71    |   ^^^^^^^^^^^^       - argument unexpected
72    |
73 note: function defined here
74   --> $DIR/extra_arguments.rs:3:4
75    |
76 LL | fn two_arg_same(_a: i32, _b: i32) {}
77    |    ^^^^^^^^^^^^ -------  -------
78 help: remove the extra argument
79    |
80 LL |   two_arg_same(1, 1);
81    |   ~~~~~~~~~~~~~~~~~~
82
83 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
84   --> $DIR/extra_arguments.rs:14:3
85    |
86 LL |   two_arg_same(1, 1, 1.0);
87    |   ^^^^^^^^^^^^       --- argument unexpected
88    |
89 note: function defined here
90   --> $DIR/extra_arguments.rs:3:4
91    |
92 LL | fn two_arg_same(_a: i32, _b: i32) {}
93    |    ^^^^^^^^^^^^ -------  -------
94 help: remove the extra argument
95    |
96 LL |   two_arg_same(1, 1);
97    |   ~~~~~~~~~~~~~~~~~~
98
99 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
100   --> $DIR/extra_arguments.rs:16:3
101    |
102 LL |   two_arg_diff(1, 1, "");
103    |   ^^^^^^^^^^^^    - argument of type `&str` unexpected
104    |
105 note: function defined here
106   --> $DIR/extra_arguments.rs:4:4
107    |
108 LL | fn two_arg_diff(_a: i32, _b: &str) {}
109    |    ^^^^^^^^^^^^ -------  --------
110 help: remove the extra argument
111    |
112 LL |   two_arg_diff(1, "");
113    |   ~~~~~~~~~~~~~~~~~~~
114
115 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
116   --> $DIR/extra_arguments.rs:17:3
117    |
118 LL |   two_arg_diff(1, "", "");
119    |   ^^^^^^^^^^^^        -- argument unexpected
120    |
121 note: function defined here
122   --> $DIR/extra_arguments.rs:4:4
123    |
124 LL | fn two_arg_diff(_a: i32, _b: &str) {}
125    |    ^^^^^^^^^^^^ -------  --------
126 help: remove the extra argument
127    |
128 LL |   two_arg_diff(1, "");
129    |   ~~~~~~~~~~~~~~~~~~~
130
131 error[E0061]: this function takes 2 arguments but 4 arguments were supplied
132   --> $DIR/extra_arguments.rs:18:3
133    |
134 LL |   two_arg_diff(1, 1, "", "");
135    |   ^^^^^^^^^^^^    -      -- argument unexpected
136    |                   |
137    |                   argument of type `&str` unexpected
138    |
139 note: function defined here
140   --> $DIR/extra_arguments.rs:4:4
141    |
142 LL | fn two_arg_diff(_a: i32, _b: &str) {}
143    |    ^^^^^^^^^^^^ -------  --------
144 help: remove the extra arguments
145    |
146 LL |   two_arg_diff(1, "");
147    |   ~~~~~~~~~~~~~~~~~~~
148
149 error[E0061]: this function takes 2 arguments but 4 arguments were supplied
150   --> $DIR/extra_arguments.rs:19:3
151    |
152 LL |   two_arg_diff(1, "", 1, "");
153    |   ^^^^^^^^^^^^        -  -- argument unexpected
154    |                       |
155    |                       argument unexpected
156    |
157 note: function defined here
158   --> $DIR/extra_arguments.rs:4:4
159    |
160 LL | fn two_arg_diff(_a: i32, _b: &str) {}
161    |    ^^^^^^^^^^^^ -------  --------
162 help: remove the extra arguments
163    |
164 LL |   two_arg_diff(1, "");
165    |   ~~~~~~~~~~~~~~~~~~~
166
167 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
168   --> $DIR/extra_arguments.rs:22:3
169    |
170 LL |   two_arg_same(1, 1,     "");
171    |   ^^^^^^^^^^^^           -- argument unexpected
172    |
173 note: function defined here
174   --> $DIR/extra_arguments.rs:3:4
175    |
176 LL | fn two_arg_same(_a: i32, _b: i32) {}
177    |    ^^^^^^^^^^^^ -------  -------
178 help: remove the extra argument
179    |
180 LL |   two_arg_same(1, 1);
181    |   ~~~~~~~~~~~~~~~~~~
182
183 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
184   --> $DIR/extra_arguments.rs:23:3
185    |
186 LL |   two_arg_diff(1, 1,     "");
187    |   ^^^^^^^^^^^^    - argument of type `&str` unexpected
188    |
189 note: function defined here
190   --> $DIR/extra_arguments.rs:4:4
191    |
192 LL | fn two_arg_diff(_a: i32, _b: &str) {}
193    |    ^^^^^^^^^^^^ -------  --------
194 help: remove the extra argument
195    |
196 LL |   two_arg_diff(1, "");
197    |   ~~~~~~~~~~~~~~~~~~~
198
199 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
200   --> $DIR/extra_arguments.rs:24:3
201    |
202 LL |   two_arg_same(
203    |   ^^^^^^^^^^^^
204 ...
205 LL |     ""
206    |     -- argument unexpected
207    |
208 note: function defined here
209   --> $DIR/extra_arguments.rs:3:4
210    |
211 LL | fn two_arg_same(_a: i32, _b: i32) {}
212    |    ^^^^^^^^^^^^ -------  -------
213 help: remove the extra argument
214    |
215 LL |   two_arg_same(1, 1);
216    |   ~~~~~~~~~~~~~~~~~~
217
218 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
219   --> $DIR/extra_arguments.rs:30:3
220    |
221 LL |   two_arg_diff(
222    |   ^^^^^^^^^^^^
223 LL |     1,
224 LL |     1,
225    |     - argument of type `&str` unexpected
226    |
227 note: function defined here
228   --> $DIR/extra_arguments.rs:4:4
229    |
230 LL | fn two_arg_diff(_a: i32, _b: &str) {}
231    |    ^^^^^^^^^^^^ -------  --------
232 help: remove the extra argument
233    |
234 LL |   two_arg_diff(1, "");
235    |   ~~~~~~~~~~~~~~~~~~~
236
237 error: aborting due to 14 previous errors
238
239 For more information about this error, try `rustc --explain E0061`.