Skip to content

Commit d285764

Browse files
tamasfeVeykril
authored andcommitted
fix(macros): no diagnostics for disabled macro
1 parent 2083ef2 commit d285764

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
@@ -1163,7 +1163,7 @@ impl DefCollector<'_> {
11631163
let loc: MacroCallLoc = self.db.lookup_intern_macro_call(call_id);
11641164

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

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

0 commit comments

Comments
 (0)