1 error[E0277]: expected a `std::ops::Fn<()>` closure, found `()`
2 --> $DIR/issue-22034.rs:18:16
4 LL | &mut *(ptr as *mut Fn())
5 | ^^^ expected an `Fn<()>` closure, found `()`
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()`
11 error: aborting due to previous error
13 For more information about this error, try `rustc --explain E0277`.