]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-22034.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-22034.stderr
index bac62a1301aadd48183cd2a47b5f03c6fff75dd6..da376fedbb98af5313eadeac191d0794e19e2100 100644 (file)
@@ -1,9 +1,11 @@
-error[E0277]: the trait bound `(): std::ops::Fn<()>` is not satisfied
+error[E0277]: expected a `std::ops::Fn<()>` closure, found `()`
   --> $DIR/issue-22034.rs:18:16
    |
 LL |         &mut *(ptr as *mut Fn())
-   |                ^^^ the trait `std::ops::Fn<()>` is not implemented for `()`
+   |                ^^^ expected an `Fn<()>` closure, found `()`
    |
+   = help: the trait `std::ops::Fn<()>` is not implemented for `()`
+   = note: wrap the `()` in a closure with no arguments: `|| { /* code */ }
    = note: required for the cast to the object type `dyn std::ops::Fn()`
 
 error: aborting due to previous error