4

I'm writing some backend code in rust using VSCode and of course the rust-analyzer. As many others, I have gotten issues with linting of macros by rust-anylyzer. I tried suppressing the linting/errors in settings.json, but with very little success.

    "editor.defaultFormatter": "matklad.rust-analyzer",
    "rust-analyzer.diagnostics.disabled": [
        "macro-error",
        "unresolved-macro-call",
        "unresolved-import"
    ],
    "rust-analyzer.experimental.procAttrMacros": false,
    "rust-analyzer.procMacro.enable": false

Yet somehow I still receive linting and error displays of unresolved-macro-errors.

I have also tried setting procAttrMacros and procMacro.enable to true, error still occurs. All github/so-questions related to the matter just suggest fiddling with rust-analyzer.diagnostics.disabled property, which I have, but that has not fixed the issue.

What am I doing wrong?

enter image description here enter image description here

Philipp Doerner
  • 1,090
  • 7
  • 24

0 Answers0