diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-22034.stderr | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-22034.stderr b/src/test/ui/issues/issue-22034.stderr new file mode 100644 index 000000000..b32de5b24 --- /dev/null +++ b/src/test/ui/issues/issue-22034.stderr @@ -0,0 +1,13 @@ +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 `()` to the object type `dyn Fn()` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. |