]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/issue-47706.stderr
Rollup merge of #106860 - anden3:doc-double-spaces, r=Dylan-DPC
[rust.git] / tests / ui / mismatched_types / issue-47706.stderr
1 error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
2   --> $DIR/issue-47706.rs:11:22
3    |
4 LL |     pub fn new(foo: Option<i32>, _: ()) -> Foo {
5    |     ------------------------------------------ takes 2 arguments
6 ...
7 LL |         self.foo.map(Foo::new)
8    |                  --- ^^^^^^^^ expected function that takes 1 argument
9    |                  |
10    |                  required by a bound introduced by this call
11    |
12 note: required by a bound in `Option::<T>::map`
13   --> $SRC_DIR/core/src/option.rs:LL:COL
14
15 error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
16   --> $DIR/issue-47706.rs:27:9
17    |
18 LL |     Bar(i32),
19    |     --- takes 1 argument
20 ...
21 LL |     foo(Qux::Bar);
22    |     --- ^^^^^^^^ expected function that takes 0 arguments
23    |     |
24    |     required by a bound introduced by this call
25    |
26 note: required by a bound in `foo`
27   --> $DIR/issue-47706.rs:22:8
28    |
29 LL | fn foo<F>(f: F)
30    |    --- required by a bound in this
31 LL | where
32 LL |     F: Fn(),
33    |        ^^^^ required by this bound in `foo`
34
35 error: aborting due to 2 previous errors
36
37 For more information about this error, try `rustc --explain E0593`.