@@ -44,16 +44,16 @@ let _ = Pet::default();
44
44
45
45
### For ` struct ` s
46
46
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
48
48
49
49
Rust allows you to create an instance of a ` struct ` using the struct literal
50
50
syntax ` Foo { bar: expr, baz: expr } ` . To do so, all fields in the ` struct `
51
51
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.
57
57
58
58
To work around these shortcomings, you can create constructor functions:
59
59
@@ -1693,7 +1693,7 @@ functions in `beta` to access `field`'s value, the value `42` or any other
1693
1693
remains at all times private to ` alpha ` . Therefore, privacy, and by extension
1694
1694
soundness, is preserved.
1695
1695
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*
1697
1697
[ RFC-0736] , where we previously allowed for the construction of a value with
1698
1698
private fields with values from a base expression.
1699
1699
0 commit comments