Skip to content

reference: rename "structure" to the more familiar "struct" #28622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ There are several kinds of item:
* [modules](#modules)
* [functions](#functions)
* [type definitions](grammar.html#type-definitions)
* [structures](#structures)
* [structs](#structs)
* [enumerations](#enumerations)
* [constant items](#constant-items)
* [static items](#static-items)
Expand Down Expand Up @@ -1155,7 +1155,7 @@ type Point = (u8, u8);
let p: Point = (41, 68);
```

### Structures
### Structs

A _structure_ is a nominal [structure type](#structure-types) defined with the
keyword `struct`.
Expand Down Expand Up @@ -2614,21 +2614,21 @@ comma:
### 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.
The location denoted by a structure field is mutable if and only if the
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:

Expand Down Expand Up @@ -3145,7 +3145,7 @@ if` condition is evaluated. If all `if` and `else if` conditions evaluate to

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
Expand Down Expand Up @@ -3469,7 +3469,7 @@ named reference to an [`enum` item](#enumerations).
### 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:

Expand Down Expand Up @@ -3497,7 +3497,7 @@ let a: List<i32> = List::Cons(7, Box::new(List::Cons(13, Box::new(List::Nil))));
### 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 (`&`)
Expand Down