]>
Commit | Line | Data |
---|---|---|
2c00a5a8 | 1 | error[E0593]: function is expected to take 1 argument, but it takes 2 arguments |
e1599b0c | 2 | --> $DIR/issue-47706.rs:11:22 |
2c00a5a8 | 3 | | |
0531ce1d | 4 | LL | pub fn new(foo: Option<i32>, _: ()) -> Foo { |
2c00a5a8 XL |
5 | | ------------------------------------------ takes 2 arguments |
6 | ... | |
0531ce1d | 7 | LL | self.foo.map(Foo::new) |
c295e0f8 XL |
8 | | --- ^^^^^^^^ expected function that takes 1 argument |
9 | | | | |
10 | | required by a bound introduced by this call | |
3c0e092e XL |
11 | | |
12 | note: required by a bound in `Option::<T>::map` | |
13 | --> $SRC_DIR/core/src/option.rs:LL:COL | |
14 | | | |
a2a8927a XL |
15 | LL | F: ~const FnOnce(T) -> U, |
16 | | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map` | |
2c00a5a8 | 17 | |
0531ce1d | 18 | error[E0593]: function is expected to take 0 arguments, but it takes 1 argument |
e1599b0c | 19 | --> $DIR/issue-47706.rs:27:9 |
0531ce1d XL |
20 | | |
21 | LL | Bar(i32), | |
22 | | -------- takes 1 argument | |
23 | ... | |
94222f64 | 24 | LL | foo(Qux::Bar); |
c295e0f8 XL |
25 | | --- ^^^^^^^^ expected function that takes 0 arguments |
26 | | | | |
27 | | required by a bound introduced by this call | |
94222f64 XL |
28 | | |
29 | note: required by a bound in `foo` | |
30 | --> $DIR/issue-47706.rs:22:8 | |
31 | | | |
e1599b0c | 32 | LL | fn foo<F>(f: F) |
ba9703b0 | 33 | | --- required by a bound in this |
e1599b0c XL |
34 | LL | where |
35 | LL | F: Fn(), | |
94222f64 | 36 | | ^^^^ required by this bound in `foo` |
0531ce1d | 37 | |
2c00a5a8 XL |
38 | error: aborting due to 2 previous errors |
39 | ||
0531ce1d | 40 | For more information about this error, try `rustc --explain E0593`. |