Skip to content

Commit 09adb6f

Browse files
committed
---
yaml --- r: 14794 b: refs/heads/try c: fde4c1e h: refs/heads/master v: v3
1 parent a23f8d6 commit 09adb6f

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
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: d7ae9f1370fc14cd77f9da6b547e533cebf7e12b
5+
refs/heads/try: fde4c1efbbe2c3fbd29b50a9fe61283714cd8769
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/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)