2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: expected a `Fn<(isize,)>` closure, found `S`
|
2019-09-16 04:58:20 +00:00
|
|
|
--> $DIR/unboxed-closures-fnmut-as-fn.rs:28:21
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-08-24 21:44:43 +00:00
|
|
|
LL | fn call_it<F:Fn(isize)->isize>(f: &F, x: isize) -> isize {
|
2020-04-06 05:15:06 +00:00
|
|
|
| ---------------- required by this bound in `call_it`
|
2019-08-24 21:44:43 +00:00
|
|
|
...
|
2018-08-08 12:28:26 +00:00
|
|
|
LL | let x = call_it(&S, 22);
|
2019-09-16 04:58:20 +00:00
|
|
|
| ^^ expected an `Fn<(isize,)>` closure, found `S`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= help: the trait `Fn<(isize,)>` is not implemented for `S`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|