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