Skip to content

Commit 62348be

Browse files
committed
fix(macros): no diagnostics for disabled macro
1 parent 866599b commit 62348be

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

11351135
if let MacroDefKind::ProcMacro(expander, _, _) = loc.def.kind {
1136-
if expander.is_dummy() || expander.is_disabled() {
1136+
if expander.is_dummy() {
11371137
// If there's no expander for the proc macro (e.g.
11381138
// because proc macros are disabled, or building the
11391139
// proc macro crate failed), report this and skip
@@ -1146,6 +1146,9 @@ impl DefCollector<'_> {
11461146
),
11471147
);
11481148

1149+
res = ReachedFixedPoint::No;
1150+
return false;
1151+
} else if expander.is_disabled() {
11491152
res = ReachedFixedPoint::No;
11501153
return false;
11511154
}

0 commit comments

Comments
 (0)