]> git.lizzy.rs Git - rust.git/blob - tests/ui/extern/extern-wrong-value-type.stderr
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / 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 |     is_fn(f);
5    |     ----- ^ expected an `Fn<()>` closure, found `extern "C" fn() {f}`
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = help: the trait `Fn<()>` is not implemented for fn item `extern "C" fn() {f}`
10    = note: wrap the `extern "C" fn() {f}` in a closure with no arguments: `|| { /* code */ }`
11 note: required by a bound in `is_fn`
12   --> $DIR/extern-wrong-value-type.rs:4:28
13    |
14 LL | fn is_fn<F>(_: F) where F: Fn() {}
15    |                            ^^^^ required by this bound in `is_fn`
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.