Skip to content

Commit 1f380fc

Browse files
authored
Fix links and typo
1 parent 2bf1c68 commit 1f380fc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

text/0000-default-field-values.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ linearly with the number of fields.
259259

260260
### Imperfect derives
261261

262+
[perfect derives]: https://smallcultfollowing.com/babysteps/blog/2022/04/12/implied-bounds-and-perfect-derive/
263+
262264
One thing to notice, is that taking default values into consideration during the
263265
desugaring of `#[derive(Default)]` would allow to side-step the issue of our
264266
lack of [perfect derives], by making the desugaring syntactically check which
@@ -639,9 +641,9 @@ it had been attached to a `struct` with the same fields and field visibility.
639641

640642
### Interaction with `#[default]`
641643

642-
[`#[default]`]: https://github.com/rust-lang/rfcs/pull/3107
644+
[default]: https://github.com/rust-lang/rfcs/pull/3107
643645

644-
It is possible today to specify a [`#[default]` variant] in an enum so that it
646+
It is possible today to specify a [`#[default]` variant][default] in an enum so that it
645647
can be `#[derive(Default)]`. A variant marked with `#[default]` will use
646648
defaulted fields when present.
647649

@@ -1653,7 +1655,7 @@ let _ = Foo { .. }; // Currently forbidden
16531655

16541656
## Privacy: building `struct`s with private defaulted fields
16551657

1656-
[privacy]: #future-privacy
1658+
[future-privacy]: #future-privacy
16571659

16581660
[RFC-0736]: https://github.com/rust-lang/rfcs/blob/master/text/0736-privacy-respecting-fru.md
16591661

0 commit comments

Comments
 (0)