]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0277]: expected a `std::ops::Fn<()>` closure, found `extern "C" fn() {f}` |
e1599b0c | 2 | --> $DIR/extern-wrong-value-type.rs:9:11 |
b7449926 | 3 | | |
e1599b0c | 4 | LL | fn is_fn<F>(_: F) where F: Fn() {} |
ba9703b0 | 5 | | ---- required by this bound in `is_fn` |
e1599b0c | 6 | ... |
b7449926 | 7 | LL | is_fn(f); |
e1599b0c | 8 | | ^ expected an `Fn<()>` closure, found `extern "C" fn() {f}` |
b7449926 XL |
9 | | |
10 | = help: the trait `std::ops::Fn<()>` is not implemented for `extern "C" fn() {f}` | |
11 | = note: wrap the `extern "C" fn() {f}` in a closure with no arguments: `|| { /* code */ } | |
b7449926 XL |
12 | |
13 | error: aborting due to previous error | |
14 | ||
15 | For more information about this error, try `rustc --explain E0277`. |