]> git.lizzy.rs Git - rust.git/commitdiff
Expand doc on dealing with "proc macro not expanded"
authorLuke Taylor <tekul.hs@gmail.com>
Thu, 31 Dec 2020 22:28:55 +0000 (22:28 +0000)
committerLuke Taylor <tekul.hs@gmail.com>
Fri, 1 Jan 2021 18:47:54 +0000 (18:47 +0000)
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.

crates/hir_def/src/diagnostics.rs

index c71266dc09137e2ecb2117cc7e10604b5e20c200..ab3f059cef675038be3c6ac2fd7e557a805b7e93 100644 (file)
@@ -133,6 +133,10 @@ fn as_any(&self) -> &(dyn Any + Send + 'static) {
 // This diagnostic is shown when a procedural macro can not be found. This usually means that
 // procedural macro support is simply disabled (and hence is only a weak hint instead of an error),
 // but can also indicate project setup problems.
+//
+// If you are seeing a lot of "proc macro not expanded" warnings, you can add this option to the
+// `rust-analyzer.diagnostics.disabled` list to prevent them from showing. Alternatively you can
+// enable support for procedural macros (see `rust-analyzer.procMacro.enable`).
 #[derive(Debug, Clone, Eq, PartialEq)]
 pub struct UnresolvedProcMacro {
     pub file: HirFileId,