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 20
20
:id: rat_zqr9uEqP6nzW
21
21
:status: draft
22
22
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.
25
26
26
27
In a declarative macro the ordering of the patterns will be the order that
27
28
they are matched against which can lead to unexpected behavior in the case
30
31
If needing to specialize logic within the macro based on a particular
31
32
expression's value, it may be better to not use a declarative macro.
32
33
33
- Limitation: Note that following this rule means that we are unable to support
34
- variadic declarative macros with one or more arguments.
35
-
36
34
.. bad_example ::
37
35
:id: bad_ex_5vK0CCmePkef
38
36
:status: draft
You can’t perform that action at this time.
0 commit comments