File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 2020 :id: rat_zqr9uEqP6nzW
2121 :status: draft
2222
23- It is common to use declarative macros to implement traits which would
24- otherwise involve repetitive code.
23+ It's common to use macros to avoid writing repetitive code, such as trait
24+ implementations. It's possible to use derive macros or declarative macros
25+ to do so.
2526
2627 In a declarative macro the ordering of the patterns will be the order that
2728 they are matched against which can lead to unexpected behavior in the case
3031 If needing to specialize logic within the macro based on a particular
3132 expression's value, it may be better to not use a declarative macro.
3233
33- Limitation: Note that following this rule means that we are unable to support
34- variadic declarative macros with one or more arguments.
35-
3634 .. bad_example ::
3735 :id: bad_ex_5vK0CCmePkef
3836 :status: draft
You can’t perform that action at this time.
0 commit comments