Skip to content

Commit 21781e3

Browse files
committed
---
yaml --- r: 11788 b: refs/heads/master c: fde4c1e h: refs/heads/master v: v3
1 parent fbfda8b commit 21781e3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d7ae9f1370fc14cd77f9da6b547e533cebf7e12b
2+
refs/heads/master: fde4c1efbbe2c3fbd29b50a9fe61283714cd8769
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/doc/rust.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,9 @@ location of which -- in the module tree of the current crate -- is defined
550550
from outside the source file: either by an explicit `source_directive` in
551551
a referencing crate file, or by the filename of the source file itself.
552552

553+
A source file that contains a `main` function can be compiled to an
554+
executable. If a `main` function is present, it must have no [type parameters](#type-parameters)
555+
and no [constraints](#constraints). Its return type must be [`nil`](#primitive-types) and it must either have no arguments, or a single argument of type `[str]`.
553556

554557
# Items and attributes
555558

@@ -592,6 +595,8 @@ the name of the enclosing item, or is private to the enclosing item (in the
592595
case of functions). The exact locations in which sub-items may be declared is
593596
given by the grammar.
594597

598+
### Type Parameters
599+
595600
All items except modules may be *parametrized* by type. Type parameters are
596601
given as a comma-separated list of identifiers enclosed in angle brackets
597602
(`<...>`), after the name of the item and before its definition. The type

0 commit comments

Comments
 (0)