File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 3333 where we have unique behavior intended for a particular expression.
3434
3535 If needing to specialize logic within the macro based on a particular
36- expression's value, it may be better to not use a declarative macro.
36+ expression's value, it is better to not use a declarative macro.
3737
3838 .. non_compliant_example ::
3939 :id: non_compl_ex_5vK0CCmePkef
@@ -43,6 +43,11 @@ Macros
4343 matching is done sequentially through the matchers and stops at the first
4444 match, the specialized case for EmergencyValve is unreachable.
4545
46+ The example would also be non-compliant if the ordering of the matchers
47+ were reversed as this introduces the possibility of future human-error
48+ when refactoring the macro to place the specialized matcher after the
49+ generic matcher.
50+
4651 .. code-block :: rust
4752
4853 #[derive(Debug)]
You can’t perform that action at this time.
0 commit comments