]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr
Rollup merge of #89945 - JohnTitor:we-now-specialize-clone-from-slice, r=the8472
[rust.git] / src / test / ui / mismatched_types / unboxed-closures-vtable-mismatch.stderr
1 error[E0631]: type mismatch in closure arguments
2   --> $DIR/unboxed-closures-vtable-mismatch.rs:16:24
3    |
4 LL |     let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y });
5    |                       ----------------------------- found signature of `fn(usize, isize) -> _`
6 LL |
7 LL |     let z = call_it(3, f);
8    |             -------    ^ expected signature of `fn(isize, isize) -> _`
9    |             |
10    |             required by a bound introduced by this call
11    |
12 note: required by a bound in `call_it`
13   --> $DIR/unboxed-closures-vtable-mismatch.rs:7:14
14    |
15 LL | fn call_it<F:FnMut(isize,isize)->isize>(y: isize, mut f: F) -> isize {
16    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it`
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0631`.