1 error[E0277]: expected a `Fn<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
2 --> $DIR/unboxed-closures-wrong-abi.rs:20:21
4 LL | let x = call_it(&square, 22);
5 | ------- ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
7 | required by a bound introduced by this call
9 = help: the trait `for<'a> Fn<(&'a isize,)>` is not implemented for fn item `for<'a> extern "C" fn(&'a isize) -> isize {square}`
10 note: required by a bound in `call_it`
11 --> $DIR/unboxed-closures-wrong-abi.rs:9:15
13 LL | fn call_it<F: Fn(&isize) -> isize>(_: &F, _: isize) -> isize {
14 | ^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it`
16 error[E0277]: expected a `FnMut<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
17 --> $DIR/unboxed-closures-wrong-abi.rs:25:25
19 LL | let y = call_it_mut(&mut square, 22);
20 | ----------- ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
22 | required by a bound introduced by this call
24 = help: the trait `for<'a> FnMut<(&'a isize,)>` is not implemented for fn item `for<'a> extern "C" fn(&'a isize) -> isize {square}`
25 note: required by a bound in `call_it_mut`
26 --> $DIR/unboxed-closures-wrong-abi.rs:12:19
28 LL | fn call_it_mut<F: FnMut(&isize) -> isize>(_: &mut F, _: isize) -> isize {
29 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it_mut`
31 error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
32 --> $DIR/unboxed-closures-wrong-abi.rs:30:26
34 LL | let z = call_it_once(square, 22);
35 | ------------ ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
37 | required by a bound introduced by this call
39 = help: the trait `for<'a> FnOnce<(&'a isize,)>` is not implemented for fn item `for<'a> extern "C" fn(&'a isize) -> isize {square}`
40 note: required by a bound in `call_it_once`
41 --> $DIR/unboxed-closures-wrong-abi.rs:15:20
43 LL | fn call_it_once<F: FnOnce(&isize) -> isize>(_: F, _: isize) -> isize {
44 | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it_once`
46 error: aborting due to 3 previous errors
48 For more information about this error, try `rustc --explain E0277`.