You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This moves the text into the intro. I think it's fine to have this be
more of a high-level introduction. The details and rules of derive
proc-macros are covered in the proc-macro chapter, so there doesn't need
to be an explicit rule here.
Copy file name to clipboardExpand all lines: src/attributes/derive.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ r[attributes.derive]
2
2
# Derive
3
3
4
4
r[attributes.derive.intro]
5
-
The *`derive` attribute* allows new [items] to be automatically generated for data structures.
5
+
The *`derive`[attribute][attributes]* allows new [items] to be automatically generated for data structures. You can implement custom `derive` macros through [procedural macros].
6
6
7
7
> [!EXAMPLE]
8
8
> The following example will create an [`impl` item] for the [`PartialEq`] and [`Clone`] traits for `Foo`, and the type parameter `T` will be given the `PartialEq` or `Clone` constraints for the appropriate `impl`:
0 commit comments