Skip to content

Commit 5b3b80a

Browse files
committed
Allow #[rustc_diagnostic_item] on macros.
1 parent a466790 commit 5b3b80a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_passes/src/diagnostic_items.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ fn collect<'tcx>(tcx: TyCtxt<'tcx>) -> FxHashMap<Symbol, DefId> {
113113
}
114114
}
115115

116+
for m in tcx.hir().krate().exported_macros {
117+
collector.observe_item(m.attrs, m.hir_id);
118+
}
119+
116120
collector.items
117121
}
118122

0 commit comments

Comments
 (0)