Proc-macro does not work with com crate

Should the proc_macro support work?

I just get "unresolved" import. My test is here: https://github.com/Ciantic/rust-analyzer-com-rs-failure/blob/master/src/main.rs

It compiles just fine with cargo build but it seems as if the proc_macros doesn't work at all in VSCode.

I have this in my project setup:

{
    "rust-analyzer.procMacro.enable": true,
    "rust-analyzer.updates.channel": "nightly",
    "rust-analyzer.cargo.loadOutDirsFromCheck": true
}

You also need "rust-analyzer.cargo.loadOutDirsFromCheck": true for rust-analyzer to be able to find the compiled proc-macro.

I added that also. Didn't help, thanks though. Would love to figure out this.

Looks like something broke in the rust-analyzer before 2020-10-05, see my bug report in here: https://github.com/microsoft/com-rs/issues/195#issuecomment-754674459

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.