File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 8
8
9
9
.. guideline :: Avoid specialized, fixed patterns within declarative macros
10
10
:id: gui_FSpI084vbwmJ
11
+ :category: required
11
12
:status: draft
12
13
:fls: fls_w44hav7mw3ao
14
+ :decidability: decidable
15
+ :scope: module
13
16
:tags: reduce-human-error
14
- :category: macros
15
- :recommendation: encouraged
16
17
17
18
Description of the guideline goes here.
18
19
31
32
If needing to specialize logic within the macro based on a particular
32
33
expression's value, it may be better to not use a declarative macro.
33
34
34
- .. bad_example ::
35
- :id: bad_ex_5vK0CCmePkef
35
+ .. non_compliant_example ::
36
+ :id: non_compl_ex_5vK0CCmePkef
36
37
:status: draft
37
38
38
39
We have two macro match rules at the same level of nesting. Since the
88
89
impl_safety_trait!(PressureSensor);
89
90
impl_safety_trait!(TemperatureSensor);
90
91
91
- .. good_example ::
92
- :id: good_ex_ILBlY8DKB6Vs
92
+ .. compliant_example ::
93
+ :id: compl_ex_ILBlY8DKB6Vs
93
94
:status: draft
94
95
95
96
For the specialized implementation we implement the trait directly.
You can’t perform that action at this time.
0 commit comments