]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs
1 #![feature(unboxed_closures)]
5 fn to_fn_mut
<A
,F
:FnMut
<A
>>(f
: F
) -> F { f }
7 fn call_it
<F
:FnMut(isize,isize)->isize>(y
: isize, mut f
: F
) -> isize {
8 //~^ NOTE required by this bound in `call_it`
13 let f
= to_fn_mut(|x
: usize, y
: isize| -> isize { (x as isize) + y }
);
14 //~^ NOTE found signature of `fn(usize, isize) -> _`
15 let z
= call_it(3, f
);
16 //~^ ERROR type mismatch
17 //~| NOTE expected signature of `fn(isize, isize) -> _`