]> git.lizzy.rs Git - rust.git/blob - src/test/ui/extern/extern-wrong-value-type.stderr
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / extern / extern-wrong-value-type.stderr
1 error[E0277]: expected a `Fn<()>` closure, found `extern "C" fn() {f}`
2   --> $DIR/extern-wrong-value-type.rs:9:11
3    |
4 LL | fn is_fn<F>(_: F) where F: Fn() {}
5    |                            ---- required by this bound in `is_fn`
6 ...
7 LL |     is_fn(f);
8    |           ^ expected an `Fn<()>` closure, found `extern "C" fn() {f}`
9    |
10    = help: the trait `Fn<()>` is not implemented for `extern "C" fn() {f}`
11    = note: wrap the `extern "C" fn() {f}` in a closure with no arguments: `|| { /* code */ }`
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0277`.