]> git.lizzy.rs Git - rust.git/blob - src/test/ui/argument-suggestions/swapped_arguments.stderr
Make some diagnostics not depend on the source of what they reference being available
[rust.git] / src / test / ui / argument-suggestions / swapped_arguments.stderr
1 error[E0308]: arguments to this function are incorrect
2   --> $DIR/swapped_arguments.rs:8:3
3    |
4 LL |   two_args(1.0, 1);
5    |   ^^^^^^^^ ---  - expected `f32`, found `{integer}`
6    |            |
7    |            expected `i32`, found `{float}`
8    |
9 note: function defined here
10   --> $DIR/swapped_arguments.rs:3:4
11    |
12 LL | fn two_args(_a: i32, _b: f32) {}
13    |    ^^^^^^^^ -------  -------
14 help: swap these arguments
15    |
16 LL |   two_args(1, 1.0);
17    |           ~~~~~~~~
18
19 error[E0308]: arguments to this function are incorrect
20   --> $DIR/swapped_arguments.rs:9:3
21    |
22 LL |   three_args(1.0,   1,  "");
23    |   ^^^^^^^^^^ ---    - expected `f32`, found `{integer}`
24    |              |
25    |              expected `i32`, found `{float}`
26    |
27 note: function defined here
28   --> $DIR/swapped_arguments.rs:4:4
29    |
30 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
31    |    ^^^^^^^^^^ -------  -------  --------
32 help: swap these arguments
33    |
34 LL |   three_args(1, 1.0, "");
35    |             ~~~~~~~~~~~~
36
37 error[E0308]: arguments to this function are incorrect
38   --> $DIR/swapped_arguments.rs:10:3
39    |
40 LL |   three_args(  1,  "", 1.0);
41    |   ^^^^^^^^^^       --  --- expected `&str`, found `{float}`
42    |                    |
43    |                    expected `f32`, found `&'static str`
44    |
45 note: function defined here
46   --> $DIR/swapped_arguments.rs:4:4
47    |
48 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
49    |    ^^^^^^^^^^ -------  -------  --------
50 help: swap these arguments
51    |
52 LL |   three_args(1, 1.0, "");
53    |             ~~~~~~~~~~~~
54
55 error[E0308]: arguments to this function are incorrect
56   --> $DIR/swapped_arguments.rs:11:3
57    |
58 LL |   three_args( "", 1.0,   1);
59    |   ^^^^^^^^^^  --         - expected `&str`, found `{integer}`
60    |               |
61    |               expected `i32`, found `&'static str`
62    |
63 note: function defined here
64   --> $DIR/swapped_arguments.rs:4:4
65    |
66 LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
67    |    ^^^^^^^^^^ -------  -------  --------
68 help: swap these arguments
69    |
70 LL |   three_args(1, 1.0, "");
71    |             ~~~~~~~~~~~~
72
73 error[E0308]: arguments to this function are incorrect
74   --> $DIR/swapped_arguments.rs:13:3
75    |
76 LL |   four_args(1.0, 1, X {}, "");
77    |   ^^^^^^^^^ ---  -  ----  -- expected `X`, found `&'static str`
78    |             |    |  |
79    |             |    |  expected `&str`, found `X`
80    |             |    expected `f32`, found `{integer}`
81    |             expected `i32`, found `{float}`
82    |
83 note: function defined here
84   --> $DIR/swapped_arguments.rs:5:4
85    |
86 LL | fn four_args(_a: i32, _b: f32, _c: &str, _d: X) {}
87    |    ^^^^^^^^^ -------  -------  --------  -----
88 help: did you mean
89    |
90 LL |   four_args(1, 1.0, "", X {});
91    |            ~~~~~~~~~~~~~~~~~~
92
93 error: aborting due to 5 previous errors
94
95 For more information about this error, try `rustc --explain E0308`.