We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c3eb88 commit 339c69dCopy full SHA for 339c69d
1 file changed
rule-preprocessor/src/syntactic.rs
@@ -121,6 +121,10 @@ impl SyntacticAnalysis {
121
let mut file_ir = FileIr::new();
122
123
for fn_item in source_file.syntax().descendants().filter_map(ast::Fn::cast) {
124
+ if !cfg_matches_host(&fn_item) {
125
+ continue;
126
+ }
127
+
128
let Some(name) = fn_item.name() else { continue };
129
let fn_name = name.text().to_string();
130
@@ -130,9 +134,6 @@ impl SyntacticAnalysis {
134
RuleIr::Type(TypeIrBuilder::new(&fn_item).build()),
131
135
);
132
136
} else if fn_name.starts_with('f') {
133
- if !cfg_matches_host(&fn_item) {
- continue;
- }
137
file_ir.insert(
138
fn_name.clone(),
139
RuleIr::Fn(FnIrBuilder::new(&fn_item).build(path)),
0 commit comments