We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5704f20 commit 9591f93Copy full SHA for 9591f93
src/closures/syntax.md
@@ -30,4 +30,15 @@ fn main() {
30
not capture any variables from their lexical environment. We will see captures
31
next.
32
33
+## More to Explore
34
+
35
+- The ability to store functions in variables doesn't just apply to closures,
36
+ regular functions can be put in variables and then invoked the same way that
37
+ closures can: [Example in the playground][fn-ptr].
38
39
+ - The linked example also demonstrates that closures that don't capture
40
+ anything can also coerce to a regular function pointer.
41
42
</details>
43
44
+[fn-ptr]: https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=817cbeeefc49f3d0d180a3d6d54c8bda
0 commit comments