mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-19 03:54:40 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
14 lines
510 B
Plaintext
14 lines
510 B
Plaintext
error[E0277]: expected a `Fn()` closure, found `()`
|
|
--> $DIR/issue-22034.rs:8:16
|
|
|
|
|
LL | &mut *(ptr as *mut dyn Fn())
|
|
| ^^^ expected an `Fn()` closure, found `()`
|
|
|
|
|
= help: the trait `Fn<()>` is not implemented for `()`
|
|
= note: wrap the `()` in a closure with no arguments: `|| { /* code */ }`
|
|
= note: required for the cast from `*mut ()` to `*mut dyn Fn()`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|