]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr
Auto merge of #102992 - nnethercote:rm-RunCompiler-emitter, r=bjorn3
[rust.git] / src / test / ui / closure-expected-type / expect-infer-var-appearing-twice.stderr
1 error[E0631]: type mismatch in closure arguments
2   --> $DIR/expect-infer-var-appearing-twice.rs:14:5
3    |
4 LL |     with_closure(|x: u32, y: i32| {
5    |     ^^^^^^^^^^^^ ---------------- found signature defined here
6    |     |
7    |     expected due to this
8    |
9    = note: expected closure signature `fn(_, _) -> _`
10               found closure signature `fn(u32, i32) -> _`
11 note: required by a bound in `with_closure`
12   --> $DIR/expect-infer-var-appearing-twice.rs:2:14
13    |
14 LL | fn with_closure<F, A>(_: F)
15    |    ------------ required by a bound in this
16 LL |     where F: FnOnce(A, A)
17    |              ^^^^^^^^^^^^ required by this bound in `with_closure`
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0631`.