fork/rust

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

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

master
1.6 KiB63 linesraw
1error[E0057]: this function takes 0 arguments but 1 argument was supplied
2  --> $DIR/exotic-calls.rs:2:5
3   |
4LL |     t(1i32);
5   |     ^ ----
6   |       |
7   |       unexpected argument of type `i32`
8   |       help: remove the extra argument
9   |
10note: callable defined here
11  --> $DIR/exotic-calls.rs:1:11
12   |
13LL | fn foo<T: Fn()>(t: T) {
14   |           ^^^^
15
16error[E0057]: this function takes 0 arguments but 1 argument was supplied
17  --> $DIR/exotic-calls.rs:7:5
18   |
19LL |     t(1i32);
20   |     ^ ----
21   |       |
22   |       unexpected argument of type `i32`
23   |       help: remove the extra argument
24   |
25note: type parameter defined here
26  --> $DIR/exotic-calls.rs:6:11
27   |
28LL | fn bar(t: impl Fn()) {
29   |           ^^^^^^^^^
30
31error[E0057]: this function takes 0 arguments but 1 argument was supplied
32  --> $DIR/exotic-calls.rs:16:5
33   |
34LL |     baz()(1i32)
35   |     ^^^^^ ----
36   |           |
37   |           unexpected argument of type `i32`
38   |           help: remove the extra argument
39   |
40note: opaque type defined here
41  --> $DIR/exotic-calls.rs:11:13
42   |
43LL | fn baz() -> impl Fn() {
44   |             ^^^^^^^^^
45
46error[E0057]: this function takes 0 arguments but 1 argument was supplied
47  --> $DIR/exotic-calls.rs:22:5
48   |
49LL |     x(1i32);
50   |     ^ ----
51   |       |
52   |       unexpected argument of type `i32`
53   |       help: remove the extra argument
54   |
55note: closure defined here
56  --> $DIR/exotic-calls.rs:21:13
57   |
58LL |     let x = || {};
59   |             ^^
60
61error: aborting due to 4 previous errors
62
63For more information about this error, try `rustc --explain E0057`.