Is a fn -> coerces to a fn

Fixes #622.
This commit is contained in:
Carol (Nichols || Goulding)
2017-08-12 15:28:46 -04:00
parent e5bb921a47
commit de930c3b57

View File

@@ -6,10 +6,10 @@ closures: function pointers, diverging functions, and returning closures.
### Function pointers
Weve talked about how to pass closures to functions, but you can pass regular
functions to functions too! Functions have the type `fn`, with a lower case f
not to be confused with the `Fn` closure trait. `fn` is called a *function
pointer*. The syntax for specifying that a parameter is a function pointer is
similar to that of closures, as shown in Listing 19-34:
functions to functions too! Functions coerce to the type `fn`, with a lower
case f not to be confused with the `Fn` closure trait. `fn` is called a
*function pointer*. The syntax for specifying that a parameter is a function
pointer is similar to that of closures, as shown in Listing 19-34:
<span class="filename">Filename: src/main.rs</span>