]> git.lizzy.rs Git - rust.git/blob - src/test/ui/argument-suggestions/invalid_arguments.stderr
Make some diagnostics not depend on the source of what they reference being available
[rust.git] / src / test / ui / argument-suggestions / invalid_arguments.stderr
1 error[E0308]: mismatched types
2   --> $DIR/invalid_arguments.rs:13:11
3    |
4 LL |   one_arg(1.0);
5    |   ------- ^^^ expected `i32`, found floating-point number
6    |   |
7    |   arguments to this function are incorrect
8    |
9 note: function defined here
10   --> $DIR/invalid_arguments.rs:5:4
11    |
12 LL | fn one_arg(_a: i32) {}
13    |    ^^^^^^^ -------
14
15 error[E0308]: mismatched types
16   --> $DIR/invalid_arguments.rs:16:19
17    |
18 LL |   two_arg_same(1, "");
19    |   ------------    ^^ expected `i32`, found `&str`
20    |   |
21    |   arguments to this function are incorrect
22    |
23 note: function defined here
24   --> $DIR/invalid_arguments.rs:6:4
25    |
26 LL | fn two_arg_same(_a: i32, _b: i32) {}
27    |    ^^^^^^^^^^^^          -------
28
29 error[E0308]: mismatched types
30   --> $DIR/invalid_arguments.rs:17:16
31    |
32 LL |   two_arg_same("", 1);
33    |   ------------ ^^ expected `i32`, found `&str`
34    |   |
35    |   arguments to this function are incorrect
36    |
37 note: function defined here
38   --> $DIR/invalid_arguments.rs:6:4
39    |
40 LL | fn two_arg_same(_a: i32, _b: i32) {}
41    |    ^^^^^^^^^^^^ -------
42
43 error[E0308]: arguments to this function are incorrect
44   --> $DIR/invalid_arguments.rs:18:3
45    |
46 LL |   two_arg_same("", "");
47    |   ^^^^^^^^^^^^ --  -- expected `i32`, found `&str`
48    |                |
49    |                expected `i32`, found `&str`
50    |
51 note: function defined here
52   --> $DIR/invalid_arguments.rs:6:4
53    |
54 LL | fn two_arg_same(_a: i32, _b: i32) {}
55    |    ^^^^^^^^^^^^ -------  -------
56
57 error[E0308]: mismatched types
58   --> $DIR/invalid_arguments.rs:19:19
59    |
60 LL |   two_arg_diff(1, "");
61    |   ------------    ^^ expected `f32`, found `&str`
62    |   |
63    |   arguments to this function are incorrect
64    |
65 note: function defined here
66   --> $DIR/invalid_arguments.rs:7:4
67    |
68 LL | fn two_arg_diff(_a: i32, _b: f32) {}
69    |    ^^^^^^^^^^^^          -------
70
71 error[E0308]: mismatched types
72   --> $DIR/invalid_arguments.rs:20:16
73    |
74 LL |   two_arg_diff("", 1.0);
75    |   ------------ ^^ expected `i32`, found `&str`
76    |   |
77    |   arguments to this function are incorrect
78    |
79 note: function defined here
80   --> $DIR/invalid_arguments.rs:7:4
81    |
82 LL | fn two_arg_diff(_a: i32, _b: f32) {}
83    |    ^^^^^^^^^^^^ -------
84
85 error[E0308]: arguments to this function are incorrect
86   --> $DIR/invalid_arguments.rs:21:3
87    |
88 LL |   two_arg_diff("", "");
89    |   ^^^^^^^^^^^^ --  -- expected `f32`, found `&str`
90    |                |
91    |                expected `i32`, found `&str`
92    |
93 note: function defined here
94   --> $DIR/invalid_arguments.rs:7:4
95    |
96 LL | fn two_arg_diff(_a: i32, _b: f32) {}
97    |    ^^^^^^^^^^^^ -------  -------
98
99 error[E0308]: mismatched types
100   --> $DIR/invalid_arguments.rs:24:18
101    |
102 LL |   three_arg_diff(X{}, 1.0, "");
103    |   -------------- ^^^ expected `i32`, found struct `X`
104    |   |
105    |   arguments to this function are incorrect
106    |
107 note: function defined here
108   --> $DIR/invalid_arguments.rs:8:4
109    |
110 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
111    |    ^^^^^^^^^^^^^^ -------
112
113 error[E0308]: mismatched types
114   --> $DIR/invalid_arguments.rs:25:21
115    |
116 LL |   three_arg_diff(1, X {}, "");
117    |   --------------    ^^^^ expected `f32`, found struct `X`
118    |   |
119    |   arguments to this function are incorrect
120    |
121 note: function defined here
122   --> $DIR/invalid_arguments.rs:8:4
123    |
124 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
125    |    ^^^^^^^^^^^^^^          -------
126
127 error[E0308]: mismatched types
128   --> $DIR/invalid_arguments.rs:26:26
129    |
130 LL |   three_arg_diff(1, 1.0, X {});
131    |   --------------         ^^^^ expected `&str`, found struct `X`
132    |   |
133    |   arguments to this function are incorrect
134    |
135 note: function defined here
136   --> $DIR/invalid_arguments.rs:8:4
137    |
138 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
139    |    ^^^^^^^^^^^^^^                   --------
140
141 error[E0308]: arguments to this function are incorrect
142   --> $DIR/invalid_arguments.rs:28:3
143    |
144 LL |   three_arg_diff(X {}, X {}, "");
145    |   ^^^^^^^^^^^^^^ ----  ---- expected `f32`, found struct `X`
146    |                  |
147    |                  expected `i32`, found struct `X`
148    |
149 note: function defined here
150   --> $DIR/invalid_arguments.rs:8:4
151    |
152 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
153    |    ^^^^^^^^^^^^^^ -------  -------  --------
154
155 error[E0308]: arguments to this function are incorrect
156   --> $DIR/invalid_arguments.rs:29:3
157    |
158 LL |   three_arg_diff(X {}, 1.0, X {});
159    |   ^^^^^^^^^^^^^^ ----       ---- expected `&str`, found struct `X`
160    |                  |
161    |                  expected `i32`, found struct `X`
162    |
163 note: function defined here
164   --> $DIR/invalid_arguments.rs:8:4
165    |
166 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
167    |    ^^^^^^^^^^^^^^ -------  -------  --------
168
169 error[E0308]: arguments to this function are incorrect
170   --> $DIR/invalid_arguments.rs:30:3
171    |
172 LL |   three_arg_diff(1, X {}, X {});
173    |   ^^^^^^^^^^^^^^    ----  ---- expected `&str`, found struct `X`
174    |                     |
175    |                     expected `f32`, found struct `X`
176    |
177 note: function defined here
178   --> $DIR/invalid_arguments.rs:8:4
179    |
180 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
181    |    ^^^^^^^^^^^^^^ -------  -------  --------
182
183 error[E0308]: arguments to this function are incorrect
184   --> $DIR/invalid_arguments.rs:32:3
185    |
186 LL |   three_arg_diff(X {}, X {}, X {});
187    |   ^^^^^^^^^^^^^^ ----  ----  ---- expected `&str`, found struct `X`
188    |                  |     |
189    |                  |     expected `f32`, found struct `X`
190    |                  expected `i32`, found struct `X`
191    |
192 note: function defined here
193   --> $DIR/invalid_arguments.rs:8:4
194    |
195 LL | fn three_arg_diff(_a: i32, _b: f32, _c: &str) {}
196    |    ^^^^^^^^^^^^^^ -------  -------  --------
197
198 error[E0308]: mismatched types
199   --> $DIR/invalid_arguments.rs:34:20
200    |
201 LL |   three_arg_repeat(X {}, 1, "");
202    |   ---------------- ^^^^ expected `i32`, found struct `X`
203    |   |
204    |   arguments to this function are incorrect
205    |
206 note: function defined here
207   --> $DIR/invalid_arguments.rs:9:4
208    |
209 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
210    |    ^^^^^^^^^^^^^^^^ -------
211
212 error[E0308]: mismatched types
213   --> $DIR/invalid_arguments.rs:35:23
214    |
215 LL |   three_arg_repeat(1, X {}, "");
216    |   ----------------    ^^^^ expected `i32`, found struct `X`
217    |   |
218    |   arguments to this function are incorrect
219    |
220 note: function defined here
221   --> $DIR/invalid_arguments.rs:9:4
222    |
223 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
224    |    ^^^^^^^^^^^^^^^^          -------
225
226 error[E0308]: mismatched types
227   --> $DIR/invalid_arguments.rs:36:26
228    |
229 LL |   three_arg_repeat(1, 1, X {});
230    |   ----------------       ^^^^ expected `&str`, found struct `X`
231    |   |
232    |   arguments to this function are incorrect
233    |
234 note: function defined here
235   --> $DIR/invalid_arguments.rs:9:4
236    |
237 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
238    |    ^^^^^^^^^^^^^^^^                   --------
239
240 error[E0308]: arguments to this function are incorrect
241   --> $DIR/invalid_arguments.rs:38:3
242    |
243 LL |   three_arg_repeat(X {}, X {}, "");
244    |   ^^^^^^^^^^^^^^^^ ----  ---- expected `i32`, found struct `X`
245    |                    |
246    |                    expected `i32`, found struct `X`
247    |
248 note: function defined here
249   --> $DIR/invalid_arguments.rs:9:4
250    |
251 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
252    |    ^^^^^^^^^^^^^^^^ -------  -------  --------
253
254 error[E0308]: arguments to this function are incorrect
255   --> $DIR/invalid_arguments.rs:39:3
256    |
257 LL |   three_arg_repeat(X {}, 1, X {});
258    |   ^^^^^^^^^^^^^^^^ ----     ---- expected `&str`, found struct `X`
259    |                    |
260    |                    expected `i32`, found struct `X`
261    |
262 note: function defined here
263   --> $DIR/invalid_arguments.rs:9:4
264    |
265 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
266    |    ^^^^^^^^^^^^^^^^ -------  -------  --------
267
268 error[E0308]: arguments to this function are incorrect
269   --> $DIR/invalid_arguments.rs:40:3
270    |
271 LL |   three_arg_repeat(1, X {}, X{});
272    |   ^^^^^^^^^^^^^^^^    ----  --- expected `&str`, found struct `X`
273    |                       |
274    |                       expected `i32`, found struct `X`
275    |
276 note: function defined here
277   --> $DIR/invalid_arguments.rs:9:4
278    |
279 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
280    |    ^^^^^^^^^^^^^^^^ -------  -------  --------
281
282 error[E0308]: arguments to this function are incorrect
283   --> $DIR/invalid_arguments.rs:42:3
284    |
285 LL |   three_arg_repeat(X {}, X {}, X {});
286    |   ^^^^^^^^^^^^^^^^ ----  ----  ---- expected `&str`, found struct `X`
287    |                    |     |
288    |                    |     expected `i32`, found struct `X`
289    |                    expected `i32`, found struct `X`
290    |
291 note: function defined here
292   --> $DIR/invalid_arguments.rs:9:4
293    |
294 LL | fn three_arg_repeat(_a: i32, _b: i32, _c: &str) {}
295    |    ^^^^^^^^^^^^^^^^ -------  -------  --------
296
297 error: aborting due to 21 previous errors
298
299 For more information about this error, try `rustc --explain E0308`.