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.
259
259
260
260
### Imperfect derives
261
261
262
+ [ perfect derives ] : https://smallcultfollowing.com/babysteps/blog/2022/04/12/implied-bounds-and-perfect-derive/
263
+
262
264
One thing to notice, is that taking default values into consideration during the
263
265
desugaring of ` #[derive(Default)] ` would allow to side-step the issue of our
264
266
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.
639
641
640
642
### Interaction with ` #[default] `
641
643
642
- [ ` #[ default] ` ] : https://github.com/rust-lang/rfcs/pull/3107
644
+ [ default ] : https://github.com/rust-lang/rfcs/pull/3107
643
645
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
645
647
can be ` #[derive(Default)] ` . A variant marked with ` #[default] ` will use
646
648
defaulted fields when present.
647
649
@@ -1653,7 +1655,7 @@ let _ = Foo { .. }; // Currently forbidden
1653
1655
1654
1656
## Privacy: building ` struct ` s with private defaulted fields
1655
1657
1656
- [ privacy ] : #future-privacy
1658
+ [ future- privacy] : #future-privacy
1657
1659
1658
1660
[ RFC-0736 ] : https://github.com/rust-lang/rfcs/blob/master/text/0736-privacy-respecting-fru.md
1659
1661
You can’t perform that action at this time.
0 commit comments