Skip to content

Commit 318f5e6

Browse files
authored
Change FRU wording and links
1 parent 1f380fc commit 318f5e6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

text/0000-default-field-values.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ let _ = Pet::default();
4444

4545
### For `struct`s
4646

47-
[FRU]: https://doc.rust-lang.org/1.31.0/book/ch05-01-defining-structs.html#creating-instances-from-other-instances-with-struct-update-syntax
47+
[update-syntax]: https://doc.rust-lang.org/book/ch05-01-defining-structs.html#creating-instances-from-other-instances-with-struct-update-syntax
4848

4949
Rust allows you to create an instance of a `struct` using the struct literal
5050
syntax `Foo { bar: expr, baz: expr }`. To do so, all fields in the `struct`
5151
must be assigned a value. This makes it inconvenient to create large `struct`s
52-
whose fields usually receive the same values.
53-
*[Functional record updates (FRU)][FRU]* can reduce noise when a `struct`
54-
derives `Default`, but are also invalid when the `struct` has inaccessible
55-
fields and do not allow the creation of an `impl` where *some* fields are
56-
mandatory.
52+
whose fields usually receive the same values. It also allows you construct [a
53+
new instance of the same `struct` by consuming some (or all) of the fields of
54+
an existing value][update-syntax], which can reduce noise when a `struct` derives `Default`,
55+
but are also invalid when the `struct` has inaccessible fields and do not allow
56+
the creation of an `impl` where *some* fields are mandatory.
5757

5858
To work around these shortcomings, you can create constructor functions:
5959

@@ -1693,7 +1693,7 @@ functions in `beta` to access `field`'s value, the value `42` or any other
16931693
remains at all times private to `alpha`. Therefore, privacy, and by extension
16941694
soundness, is preserved.
16951695

1696-
This used to be the behavior the Functional Record Update syntax had *before*
1696+
This used to be the behavior the [Functional Record Update syntax had *before*
16971697
[RFC-0736], where we previously allowed for the construction of a value with
16981698
private fields with values from a base expression.
16991699

0 commit comments

Comments
 (0)