File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,16 @@ use ptr::P;
19
19
use util:: small_vector:: SmallVector ;
20
20
21
21
pub trait CfgFolder : fold:: Folder {
22
+ // Check if a node with the given attributes is in this configuration.
22
23
fn in_cfg ( & mut self , attrs : & [ ast:: Attribute ] ) -> bool ;
24
+
25
+ // Update a node before checking if it is in this configuration (used to implement `cfg_attr`).
23
26
fn process_attrs < T : HasAttrs > ( & mut self , node : T ) -> T { node }
27
+
28
+ // Visit attributes on expression and statements (but not attributes on items in blocks).
24
29
fn visit_stmt_or_expr_attrs ( & mut self , _attrs : & [ ast:: Attribute ] ) { }
30
+
31
+ // Visit unremovable (non-optional) expressions -- c.f. `fold_expr` vs `fold_opt_expr`.
25
32
fn visit_unremovable_expr ( & mut self , _expr : & ast:: Expr ) { }
26
33
27
34
fn configure < T : HasAttrs > ( & mut self , node : T ) -> Option < T > {
You can’t perform that action at this time.
0 commit comments