]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0277]: expected a `std::ops::Fn<()>` closure, found `()` |
0731742a | 2 | --> $DIR/issue-22034.rs:8:16 |
b7449926 | 3 | | |
dc9dc135 | 4 | LL | &mut *(ptr as *mut dyn Fn()) |
b7449926 XL |
5 | | ^^^ expected an `Fn<()>` closure, found `()` |
6 | | | |
7 | = help: the trait `std::ops::Fn<()>` is not implemented for `()` | |
8 | = note: wrap the `()` in a closure with no arguments: `|| { /* code */ } | |
9 | = note: required for the cast to the object type `dyn std::ops::Fn()` | |
10 | ||
11 | error: aborting due to previous error | |
12 | ||
13 | For more information about this error, try `rustc --explain E0277`. |