fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.5 KiB118 linesraw
1error[E0061]: this function takes 2 arguments but 3 arguments were supplied
2  --> $DIR/mixed_cases.rs:10:3
3   |
4LL |   two_args(1, "", X {});
5   |   ^^^^^^^^    --  ---- unexpected argument of type `X`
6   |               |
7   |               expected `f32`, found `&str`
8   |
9note: function defined here
10  --> $DIR/mixed_cases.rs:5:4
11   |
12LL | fn two_args(_a: i32, _b: f32) {}
13   |    ^^^^^^^^ -------  -------
14help: remove the extra argument
15   |
16LL -   two_args(1, "", X {});
17LL +   two_args(1, /* f32 */);
18   |
19
20error[E0061]: this function takes 3 arguments but 4 arguments were supplied
21  --> $DIR/mixed_cases.rs:11:3
22   |
23LL |   three_args(1, "", X {}, "");
24   |   ^^^^^^^^^^    --  ----  -- unexpected argument of type `&'static str`
25   |                 |   |
26   |                 |   unexpected argument of type `X`
27   |                 an argument of type `f32` is missing
28   |
29note: function defined here
30  --> $DIR/mixed_cases.rs:6:4
31   |
32LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
33   |    ^^^^^^^^^^ -------  -------  --------
34help: did you mean
35   |
36LL |   three_args(1, /* f32 */, "");
37   |             ~~~~~~~~~~~~~~~~~~
38
39error[E0061]: this function takes 3 arguments but 2 arguments were supplied
40  --> $DIR/mixed_cases.rs:14:3
41   |
42LL |   three_args(1, X {});
43   |   ^^^^^^^^^^---------
44   |             |   |
45   |             |   expected `f32`, found `X`
46   |             an argument of type `&str` is missing
47   |
48note: function defined here
49  --> $DIR/mixed_cases.rs:6:4
50   |
51LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
52   |    ^^^^^^^^^^ -------  -------  --------
53help: provide the argument
54   |
55LL |   three_args(1, /* f32 */, /* &str */);
56   |             ~~~~~~~~~~~~~~~~~~~~~~~~~~
57
58error[E0308]: arguments to this function are incorrect
59  --> $DIR/mixed_cases.rs:17:3
60   |
61LL |   three_args(1, "", X {});
62   |   ^^^^^^^^^^    --  ---- unexpected argument of type `X`
63   |                 |
64   |                 an argument of type `f32` is missing
65   |
66note: function defined here
67  --> $DIR/mixed_cases.rs:6:4
68   |
69LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
70   |    ^^^^^^^^^^ -------  -------  --------
71help: did you mean
72   |
73LL |   three_args(1, /* f32 */, "");
74   |             ~~~~~~~~~~~~~~~~~~
75
76error[E0308]: arguments to this function are incorrect
77  --> $DIR/mixed_cases.rs:20:3
78   |
79LL |   three_args("", X {}, 1);
80   |   ^^^^^^^^^^ --  ----  - expected `&str`, found `{integer}`
81   |              |   |
82   |              |   expected `f32`, found `X`
83   |              expected `i32`, found `&'static str`
84   |
85note: function defined here
86  --> $DIR/mixed_cases.rs:6:4
87   |
88LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
89   |    ^^^^^^^^^^ -------  -------  --------
90help: swap these arguments
91   |
92LL |   three_args(1, /* f32 */, "");
93   |             ~~~~~~~~~~~~~~~~~~
94
95error[E0061]: this function takes 3 arguments but 2 arguments were supplied
96  --> $DIR/mixed_cases.rs:23:3
97   |
98LL |   three_args("", 1);
99   |   ^^^^^^^^^^ --  -
100   |              |   |
101   |              |   an argument of type `f32` is missing
102   |              |   expected `&str`, found `{integer}`
103   |              expected `i32`, found `&'static str`
104   |
105note: function defined here
106  --> $DIR/mixed_cases.rs:6:4
107   |
108LL | fn three_args(_a: i32, _b: f32, _c: &str) {}
109   |    ^^^^^^^^^^ -------  -------  --------
110help: did you mean
111   |
112LL |   three_args(1, /* f32 */, "");
113   |             ~~~~~~~~~~~~~~~~~~
114
115error: aborting due to 6 previous errors
116
117Some errors have detailed explanations: E0061, E0308.
118For more information about an error, try `rustc --explain E0061`.