@@ -674,7 +674,7 @@ There are several kinds of item:
674674* [ modules] ( #modules )
675675* [ functions] ( #functions )
676676* [ type definitions] ( grammar.html#type-definitions )
677- * [ structures ] ( #structures )
677+ * [ structs ] ( #structs )
678678* [ enumerations] ( #enumerations )
679679* [ constant items] ( #constant-items )
680680* [ static items] ( #static-items )
@@ -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
906907set of * input* [ * variables* ] ( #variables ) as parameters, through which the caller
907908passes arguments into the function, and the * output* [ * type* ] ( #types )
908909of the value the function will return to its caller on completion.
@@ -921,7 +922,7 @@ An example of a function:
921922
922923```
923924fn add(x: i32, y: i32) -> i32 {
924- return x + y;
925+ x + y
925926}
926927```
927928
@@ -1155,7 +1156,7 @@ type Point = (u8, u8);
11551156let p: Point = (41, 68);
11561157```
11571158
1158- ### Structures
1159+ ### Structs
11591160
11601161A _ structure_ is a nominal [ structure type] ( #structure-types ) defined with the
11611162keyword ` struct ` .
@@ -2092,6 +2093,8 @@ The following configurations must be defined by the implementation:
20922093* ` target_pointer_width = "..." ` - Target pointer width in bits. This is set
20932094 to ` "32" ` for targets with 32-bit pointers, and likewise set to ` "64" ` for
20942095 64-bit pointers.
2096+ * ` target_vendor = "..." ` - Vendor of the target, for example ` apple ` , ` pc ` , or
2097+ simply ` "unknown" ` .
20952098* ` test ` - Enabled when compiling the test harness (using the ` --test ` flag).
20962099* ` unix ` - See ` target_family ` .
20972100* ` windows ` - See ` target_family ` .
@@ -2268,7 +2271,7 @@ The currently implemented features of the reference compiler are:
22682271* ` advanced_slice_patterns ` - See the [ match expressions] ( #match-expressions )
22692272 section for discussion; the exact semantics of
22702273 slice patterns are subject to change, so some types
2271- are still unstable.
2274+ are still unstable.
22722275
22732276* ` slice_patterns ` - OK, actually, slice patterns are just scary and
22742277 completely unstable.
@@ -2289,6 +2292,9 @@ The currently implemented features of the reference compiler are:
22892292* ` box_syntax ` - Allows use of ` box ` expressions, the exact semantics of which
22902293 is subject to change.
22912294
2295+ * ` cfg_target_vendor ` - Allows conditional compilation using the ` target_vendor `
2296+ matcher which is subject to change.
2297+
22922298* ` concat_idents ` - Allows use of the ` concat_idents ` macro, which is in many
22932299 ways insufficient for concatenating identifiers, and may be
22942300 removed entirely for something more wholesome.
@@ -2614,21 +2620,21 @@ comma:
26142620### Structure expressions
26152621
26162622There are several forms of structure expressions. A _ structure expression_
2617- consists of the [ path] ( #paths ) of a [ structure item] ( #structures ) , followed by
2623+ consists of the [ path] ( #paths ) of a [ structure item] ( #structs ) , followed by
26182624a brace-enclosed list of one or more comma-separated name-value pairs,
26192625providing the field values of a new instance of the structure. A field name
26202626can be any identifier, and is separated from its value expression by a colon.
26212627The location denoted by a structure field is mutable if and only if the
26222628enclosing structure is mutable.
26232629
26242630A _ tuple structure expression_ consists of the [ path] ( #paths ) of a [ structure
2625- item] ( #structures ) , followed by a parenthesized list of one or more
2631+ item] ( #structs ) , followed by a parenthesized list of one or more
26262632comma-separated expressions (in other words, the path of a structure item
26272633followed by a tuple expression). The structure item must be a tuple structure
26282634item.
26292635
26302636A _ unit-like structure expression_ consists only of the [ path] ( #paths ) of a
2631- [ structure item] ( #structures ) .
2637+ [ structure item] ( #structs ) .
26322638
26332639The following are examples of structure expressions:
26342640
@@ -3145,7 +3151,7 @@ if` condition is evaluated. If all `if` and `else if` conditions evaluate to
31453151
31463152A ` match ` expression branches on a * pattern* . The exact form of matching that
31473153occurs depends on the pattern. Patterns consist of some combination of
3148- literals, destructured arrays or enum constructors, structures and tuples,
3154+ literals, destructured arrays or enum constructors, structs and tuples,
31493155variable binding specifications, wildcards (` .. ` ), and placeholders (` _ ` ). A
31503156` match ` expression has a * head expression* , which is the value to compare to
31513157the patterns. The type of the patterns must equal the type of the head
@@ -3469,7 +3475,7 @@ named reference to an [`enum` item](#enumerations).
34693475### Recursive types
34703476
34713477Nominal types &mdash ; [ enumerations] ( #enumerated-types ) and
3472- [ structures ] ( #structure-types ) &mdash ; may be recursive. That is, each ` enum `
3478+ [ structs ] ( #structure-types ) &mdash ; may be recursive. That is, each ` enum `
34733479constructor or ` struct ` field may refer, directly or indirectly, to the
34743480enclosing ` enum ` or ` struct ` type itself. Such recursion has restrictions:
34753481
@@ -3497,7 +3503,7 @@ let a: List<i32> = List::Cons(7, Box::new(List::Cons(13, Box::new(List::Nil))));
34973503### Pointer types
34983504
34993505All pointers in Rust are explicit first-class values. They can be copied,
3500- stored into data structures , and returned from functions. There are two
3506+ stored into data structs , and returned from functions. There are two
35013507varieties of pointer in Rust:
35023508
35033509* References (` & ` )
@@ -3897,7 +3903,7 @@ references to boxes are dropped.
38973903### Variables
38983904
38993905A _ variable_ is a component of a stack frame, either a named function parameter,
3900- an anonymous [ temporary] ( #lvalues, -rvalues-and-temporaries ) , or a named local
3906+ an anonymous [ temporary] ( #lvalues-rvalues-and-temporaries ) , or a named local
39013907variable.
39023908
39033909A _ local variable_ (or * stack-local* allocation) holds a value directly,
@@ -4036,10 +4042,6 @@ In general, `--crate-type=bin` or `--crate-type=lib` should be sufficient for
40364042all compilation needs, and the other options are just available if more
40374043fine-grained control is desired over the output format of a Rust crate.
40384044
4039- # Appendix: Rationales and design trade-offs
4040-
4041- * TODO* .
4042-
40434045# Appendix: Influences
40444046
40454047Rust is not a particularly original language, with design elements coming from
0 commit comments