]> git.proxmox.com Git - rustc.git/blame - src/test/ui/extern/extern-wrong-value-type.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / extern / extern-wrong-value-type.stderr
CommitLineData
b7449926 1error[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 4LL | fn is_fn<F>(_: F) where F: Fn() {}
ba9703b0 5 | ---- required by this bound in `is_fn`
e1599b0c 6...
b7449926 7LL | 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
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0277`.