We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7ba18da + 27084a2 commit a365f73Copy full SHA for a365f73
src/tools/rust-analyzer/crates/hir-def/src/body/lower.rs
@@ -1381,6 +1381,9 @@ impl ExprCollector<'_> {
1381
}
1382
1383
ast::Stmt::Item(ast::Item::MacroDef(macro_)) => {
1384
+ if self.check_cfg(¯o_).is_none() {
1385
+ return;
1386
+ }
1387
let Some(name) = macro_.name() else {
1388
statements.push(Statement::Item(Item::Other));
1389
return;
@@ -1390,6 +1393,9 @@ impl ExprCollector<'_> {
1390
1393
self.collect_macro_def(statements, macro_id);
1391
1394
1392
1395
ast::Stmt::Item(ast::Item::MacroRules(macro_)) => {
1396
1397
1398
1399
1400
1401
0 commit comments