aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Taylor <[email protected]>2020-12-31 22:28:55 +0000
committerLuke Taylor <[email protected]>2021-01-01 18:47:54 +0000
commit10c9efc24bc471f05be80a03ae02dc1398d84d6c (patch)
treeaafdda3b82bb196a7eb62db78faeb710fc3c9f27
parent6168a6f1ca22000158e2896348e54ba47d5d80db (diff)
Expand doc on dealing with "proc macro not expanded"
Added the error message to the doc for the UnresolvedProcMacro diagnostic, explaining that either enabling the procMacro setting or disabling this diagnostic should make the warnings go away.
-rw-r--r--crates/hir_def/src/diagnostics.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_def/src/diagnostics.rs b/crates/hir_def/src/diagnostics.rs
index c71266dc0..ab3f059ce 100644
--- a/crates/hir_def/src/diagnostics.rs
+++ b/crates/hir_def/src/diagnostics.rs
@@ -133,6 +133,10 @@ impl Diagnostic for InactiveCode {
133// This diagnostic is shown when a procedural macro can not be found. This usually means that 133// This diagnostic is shown when a procedural macro can not be found. This usually means that
134// procedural macro support is simply disabled (and hence is only a weak hint instead of an error), 134// procedural macro support is simply disabled (and hence is only a weak hint instead of an error),
135// but can also indicate project setup problems. 135// but can also indicate project setup problems.
136//
137// If you are seeing a lot of "proc macro not expanded" warnings, you can add this option to the
138// `rust-analyzer.diagnostics.disabled` list to prevent them from showing. Alternatively you can
139// enable support for procedural macros (see `rust-analyzer.procMacro.enable`).
136#[derive(Debug, Clone, Eq, PartialEq)] 140#[derive(Debug, Clone, Eq, PartialEq)]
137pub struct UnresolvedProcMacro { 141pub struct UnresolvedProcMacro {
138 pub file: HirFileId, 142 pub file: HirFileId,