File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff 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+
262264One thing to notice, is that taking default values into consideration during the
263265desugaring of ` #[derive(Default)] ` would allow to side-step the issue of our
264266lack 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
645647can be ` #[derive(Default)] ` . A variant marked with ` #[default] ` will use
646648defaulted 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
You can’t perform that action at this time.
0 commit comments