Skip to content

Commit ab50ec9

Browse files
tamasfeVeykril
authored andcommitted
fix(macros): no diagnostics for disabled macro
1 parent 6d45afd commit ab50ec9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/hir-def/src/nameres/collector.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ impl DefCollector<'_> {
11641164
let loc: MacroCallLoc = self.db.lookup_intern_macro_call(call_id);
11651165

11661166
if let MacroDefKind::ProcMacro(expander, _, _) = loc.def.kind {
1167-
if expander.is_dummy() || expander.is_disabled() {
1167+
if expander.is_dummy() {
11681168
// If there's no expander for the proc macro (e.g.
11691169
// because proc macros are disabled, or building the
11701170
// proc macro crate failed), report this and skip
@@ -1177,6 +1177,9 @@ impl DefCollector<'_> {
11771177
),
11781178
);
11791179

1180+
res = ReachedFixedPoint::No;
1181+
return false;
1182+
} else if expander.is_disabled() {
11801183
res = ReachedFixedPoint::No;
11811184
return false;
11821185
}

0 commit comments

Comments
 (0)