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