about summary refs log tree commit diff
path: root/tests/ui/argument-suggestions/exotic-calls.stderr
blob: e78871c19cb978079ec5e62303d4e00ed03b1cc3 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
error[E0057]: this function takes 0 arguments but 1 argument was supplied
  --> $DIR/exotic-calls.rs:6:5
   |
LL |     t(1i32);
   |     ^ ---- unexpected argument of type `i32`
   |
note: callable defined here
  --> $DIR/exotic-calls.rs:5:11
   |
LL | fn foo<T: Fn()>(t: T) {
   |           ^^^^
help: remove the extra argument
   |
LL -     t(1i32);
LL +     t();
   |

error[E0057]: this function takes 0 arguments but 1 argument was supplied
  --> $DIR/exotic-calls.rs:12:9
   |
LL |     |t| f(t);
   |         ^ - unexpected argument
   |
note: callable defined here
  --> $DIR/exotic-calls.rs:11:12
   |
LL | fn foo2<T: Fn()>(f: T) {
   |            ^^^^
help: remove the extra argument
   |
LL -     |t| f(t);
LL +     |t| f();
   |

error[E0057]: this function takes 0 arguments but 1 argument was supplied
  --> $DIR/exotic-calls.rs:17:5
   |
LL |     t(1i32);
   |     ^ ---- unexpected argument of type `i32`
   |
note: type parameter defined here
  --> $DIR/exotic-calls.rs:16:11
   |
LL | fn bar(t: impl Fn()) {
   |           ^^^^^^^^^
help: remove the extra argument
   |
LL -     t(1i32);
LL +     t();
   |

error[E0057]: this function takes 0 arguments but 1 argument was supplied
  --> $DIR/exotic-calls.rs:26:5
   |
LL |     baz()(1i32)
   |     ^^^^^ ---- unexpected argument of type `i32`
   |
note: opaque type defined here
  --> $DIR/exotic-calls.rs:21:13
   |
LL | fn baz() -> impl Fn() {
   |             ^^^^^^^^^
help: remove the extra argument
   |
LL -     baz()(1i32)
LL +     baz()()
   |

error[E0057]: this function takes 0 arguments but 1 argument was supplied
  --> $DIR/exotic-calls.rs:32:5
   |
LL |     x(1i32);
   |     ^ ---- unexpected argument of type `i32`
   |
note: closure defined here
  --> $DIR/exotic-calls.rs:31:13
   |
LL |     let x = || {};
   |             ^^
help: remove the extra argument
   |
LL -     x(1i32);
LL +     x();
   |

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0057`.