rust/src/test/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr

15 lines
566 B
Plaintext
Raw Normal View History

2018-08-15 15:17:04 -05:00
error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `S`
2018-12-25 09:56:47 -06:00
--> $DIR/unboxed-closures-fnmut-as-fn.rs:28:13
2018-08-08 07:28:26 -05:00
|
LL | fn call_it<F:Fn(isize)->isize>(f: &F, x: isize) -> isize {
| -------------------------------------------------------- required by `call_it`
...
2018-08-08 07:28:26 -05:00
LL | let x = call_it(&S, 22);
2018-08-15 15:17:04 -05:00
| ^^^^^^^ expected an `Fn<(isize,)>` closure, found `S`
2018-08-08 07:28:26 -05:00
|
2018-08-15 15:17:04 -05:00
= help: the trait `std::ops::Fn<(isize,)>` is not implemented for `S`
2018-08-08 07:28:26 -05:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.