* [modules](#modules)
* [functions](#functions)
* [type definitions](grammar.html#type-definitions)
-* [structures](#structures)
+* [structs](#structs)
* [enumerations](#enumerations)
* [constant items](#constant-items)
* [static items](#static-items)
```
fn add(x: i32, y: i32) -> i32 {
- return x + y;
+ x + y
}
```
let p: Point = (41, 68);
```
-### Structures
+### Structs
A _structure_ is a nominal [structure type](#structure-types) defined with the
keyword `struct`.
* `target_pointer_width = "..."` - Target pointer width in bits. This is set
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
64-bit pointers.
+* `target_vendor = "..."` - Vendor of the target, for example `apple`, `pc`, or
+ simply `"unknown"`.
* `test` - Enabled when compiling the test harness (using the `--test` flag).
* `unix` - See `target_family`.
* `windows` - See `target_family`.
* `advanced_slice_patterns` - See the [match expressions](#match-expressions)
section for discussion; the exact semantics of
slice patterns are subject to change, so some types
- are still unstable.
+ are still unstable.
* `slice_patterns` - OK, actually, slice patterns are just scary and
completely unstable.
* `box_syntax` - Allows use of `box` expressions, the exact semantics of which
is subject to change.
+* `cfg_target_vendor` - Allows conditional compilation using the `target_vendor`
+ matcher which is subject to change.
+
* `concat_idents` - Allows use of the `concat_idents` macro, which is in many
ways insufficient for concatenating identifiers, and may be
removed entirely for something more wholesome.
### Structure expressions
There are several forms of structure expressions. A _structure expression_
-consists of the [path](#paths) of a [structure item](#structures), followed by
+consists of the [path](#paths) of a [structure item](#structs), followed by
a brace-enclosed list of one or more comma-separated name-value pairs,
providing the field values of a new instance of the structure. A field name
can be any identifier, and is separated from its value expression by a colon.
enclosing structure is mutable.
A _tuple structure expression_ consists of the [path](#paths) of a [structure
-item](#structures), followed by a parenthesized list of one or more
+item](#structs), followed by a parenthesized list of one or more
comma-separated expressions (in other words, the path of a structure item
followed by a tuple expression). The structure item must be a tuple structure
item.
A _unit-like structure expression_ consists only of the [path](#paths) of a
-[structure item](#structures).
+[structure item](#structs).
The following are examples of structure expressions:
A `match` expression branches on a *pattern*. The exact form of matching that
occurs depends on the pattern. Patterns consist of some combination of
-literals, destructured arrays or enum constructors, structures and tuples,
+literals, destructured arrays or enum constructors, structs and tuples,
variable binding specifications, wildcards (`..`), and placeholders (`_`). A
`match` expression has a *head expression*, which is the value to compare to
the patterns. The type of the patterns must equal the type of the head
### Recursive types
Nominal types — [enumerations](#enumerated-types) and
-[structures](#structure-types) — may be recursive. That is, each `enum`
+[structs](#structure-types) — may be recursive. That is, each `enum`
constructor or `struct` field may refer, directly or indirectly, to the
enclosing `enum` or `struct` type itself. Such recursion has restrictions:
### Pointer types
All pointers in Rust are explicit first-class values. They can be copied,
-stored into data structures, and returned from functions. There are two
+stored into data structs, and returned from functions. There are two
varieties of pointer in Rust:
* References (`&`)
### Variables
A _variable_ is a component of a stack frame, either a named function parameter,
-an anonymous [temporary](#lvalues,-rvalues-and-temporaries), or a named local
+an anonymous [temporary](#lvalues-rvalues-and-temporaries), or a named local
variable.
A _local variable_ (or *stack-local* allocation) holds a value directly,
all compilation needs, and the other options are just available if more
fine-grained control is desired over the output format of a Rust crate.
-# Appendix: Rationales and design trade-offs
-
-*TODO*.
-
# Appendix: Influences
Rust is not a particularly original language, with design elements coming from