Skip to content

Commit c3ca182

Browse files
committed
Rollup merge of #28622 - tshepang:known-as-structs, r=steveklabnik
2 parents e314ac6 + 0b13ee0 commit c3ca182

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/doc/reference.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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)
@@ -1156,7 +1156,7 @@ type Point = (u8, u8);
11561156
let p: Point = (41, 68);
11571157
```
11581158

1159-
### Structures
1159+
### Structs
11601160

11611161
A _structure_ is a nominal [structure type](#structure-types) defined with the
11621162
keyword `struct`.
@@ -2615,21 +2615,21 @@ comma:
26152615
### Structure expressions
26162616

26172617
There are several forms of structure expressions. A _structure expression_
2618-
consists of the [path](#paths) of a [structure item](#structures), followed by
2618+
consists of the [path](#paths) of a [structure item](#structs), followed by
26192619
a brace-enclosed list of one or more comma-separated name-value pairs,
26202620
providing the field values of a new instance of the structure. A field name
26212621
can be any identifier, and is separated from its value expression by a colon.
26222622
The location denoted by a structure field is mutable if and only if the
26232623
enclosing structure is mutable.
26242624

26252625
A _tuple structure expression_ consists of the [path](#paths) of a [structure
2626-
item](#structures), followed by a parenthesized list of one or more
2626+
item](#structs), followed by a parenthesized list of one or more
26272627
comma-separated expressions (in other words, the path of a structure item
26282628
followed by a tuple expression). The structure item must be a tuple structure
26292629
item.
26302630

26312631
A _unit-like structure expression_ consists only of the [path](#paths) of a
2632-
[structure item](#structures).
2632+
[structure item](#structs).
26332633

26342634
The following are examples of structure expressions:
26352635

@@ -3146,7 +3146,7 @@ if` condition is evaluated. If all `if` and `else if` conditions evaluate to
31463146

31473147
A `match` expression branches on a *pattern*. The exact form of matching that
31483148
occurs depends on the pattern. Patterns consist of some combination of
3149-
literals, destructured arrays or enum constructors, structures and tuples,
3149+
literals, destructured arrays or enum constructors, structs and tuples,
31503150
variable binding specifications, wildcards (`..`), and placeholders (`_`). A
31513151
`match` expression has a *head expression*, which is the value to compare to
31523152
the patterns. The type of the patterns must equal the type of the head
@@ -3470,7 +3470,7 @@ named reference to an [`enum` item](#enumerations).
34703470
### Recursive types
34713471

34723472
Nominal types — [enumerations](#enumerated-types) and
3473-
[structures](#structure-types) — may be recursive. That is, each `enum`
3473+
[structs](#structure-types) — may be recursive. That is, each `enum`
34743474
constructor or `struct` field may refer, directly or indirectly, to the
34753475
enclosing `enum` or `struct` type itself. Such recursion has restrictions:
34763476

@@ -3498,7 +3498,7 @@ let a: List<i32> = List::Cons(7, Box::new(List::Cons(13, Box::new(List::Nil))));
34983498
### Pointer types
34993499

35003500
All pointers in Rust are explicit first-class values. They can be copied,
3501-
stored into data structures, and returned from functions. There are two
3501+
stored into data structs, and returned from functions. There are two
35023502
varieties of pointer in Rust:
35033503

35043504
* References (`&`)

0 commit comments

Comments
 (0)