blob: 762f0744d80c9feba9dd8d8d7524c68e36cc2061 [file] [log] [blame]
error[E0631]: type mismatch in closure arguments
--> $DIR/unboxed-closures-vtable-mismatch.rs:25:13
|
LL | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y });
| ----------------------------- found signature of `fn(usize, isize) -> _`
LL | //~^ NOTE found signature of `fn(usize, isize) -> _`
LL | let z = call_it(3, f);
| ^^^^^^^ expected signature of `fn(isize, isize) -> _`
|
note: required by `call_it`
--> $DIR/unboxed-closures-vtable-mismatch.rs:17:1
|
LL | fn call_it<F:FnMut(isize,isize)->isize>(y: isize, mut f: F) -> isize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0631`.