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