]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / tests / 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 defined here
6 LL |
7 LL |     let z = call_it(3, f);
8    |             -------    ^ expected due to this
9    |             |
10    |             required by a bound introduced by this call
11    |
12    = note: expected closure signature `fn(isize, _) -> _`
13               found closure signature `fn(usize, _) -> _`
14 note: required by a bound in `call_it`
15   --> $DIR/unboxed-closures-vtable-mismatch.rs:7:15
16    |
17 LL | fn call_it<F: FnMut(isize, isize) -> isize>(y: isize, mut f: F) -> isize {
18    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it`
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0631`.