]> git.lizzy.rs Git - rust.git/blob - src/test/ui/argument-suggestions/permuted_arguments.stderr
Make some diagnostics not depend on the source of what they reference being available
[rust.git] / src / test / ui / argument-suggestions / permuted_arguments.stderr
1 error[E0308]: arguments to this function are incorrect
2   --> $DIR/permuted_arguments.rs:10:3
3    |
4 LL |   three_args(1.0, "", 1);
5    |   ^^^^^^^^^^ ---  --  - expected `&str`, found `{integer}`
6    |              |    |
7    |              |    expected `f32`, found `&'static str`
8    |              expected `i32`, found `{float}`
9    |
10 note: function defined here
11   --> $DIR/permuted_arguments.rs:5:4
12    |
13 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
14    |    ^^^^^^^^^^ -------  -------  --------
15 help: reorder these arguments
16    |
17 LL |   three_args(1, 1.0, "");
18    |             ~~~~~~~~~~~~
19
20 error[E0308]: arguments to this function are incorrect
21   --> $DIR/permuted_arguments.rs:12:3
22    |
23 LL |   many_args(X {}, Y {}, 1, 1.0, "");
24    |   ^^^^^^^^^ ----  ----  -  ---  -- expected `Y`, found `&'static str`
25    |             |     |     |  |
26    |             |     |     |  expected `X`, found `{float}`
27    |             |     |     expected `&str`, found `{integer}`
28    |             |     expected `f32`, found `Y`
29    |             expected `i32`, found `X`
30    |
31 note: function defined here
32   --> $DIR/permuted_arguments.rs:6:4
33    |
34 LL | fn many_args(_a: i32, _b: f32, _c: &str, _d: X, _e: Y) {}
35    |    ^^^^^^^^^ -------  -------  --------  -----  -----
36 help: reorder these arguments
37    |
38 LL |   many_args(1, 1.0, "", X {}, Y {});
39    |            ~~~~~~~~~~~~~~~~~~~~~~~~
40
41 error: aborting due to 2 previous errors
42
43 For more information about this error, try `rustc --explain E0308`.