Skip to content

Commit c16b0f7

Browse files
committed
Rollup merge of rust-lang#28617 - tshepang:optional, r=steveklabnik
2 parents 6f0a095 + 996bd9d commit c16b0f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/doc/reference.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,10 @@ fn main() {}
900900

901901
### Functions
902902

903-
A _function item_ defines a sequence of [statements](#statements) and an
904-
optional final [expression](#expressions), along with a name and a set of
905-
parameters. Functions are declared with the keyword `fn`. Functions declare a
903+
A _function item_ defines a sequence of [statements](#statements) and a
904+
final [expression](#expressions), along with a name and a set of
905+
parameters. Other than a name, all these are optional.
906+
Functions are declared with the keyword `fn`. Functions may declare a
906907
set of *input* [*variables*](#variables) as parameters, through which the caller
907908
passes arguments into the function, and the *output* [*type*](#types)
908909
of the value the function will return to its caller on completion.

0 commit comments

Comments
 (0)