rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Incorrect macro parsing error

Open wackazong opened this issue 1 year ago • 7 comments

rust-analyzer version: v0.4.2004 (pre-release)

rustc version: rustc 1.76.0 (07dca489a 2024-02-04)

editor or extension: VSCodium rust-analyer prerelease

repository link (if public, optional): https://github.com/dtolnay/syn/issues/1684

code snippet to reproduce: See repo

Problem: RA reports an error of the macro, but the code compiles just fine on the command line.

wackazong avatar Jun 20 '24 13:06 wackazong

What error do you get, "missing ,"?

lnicola avatar Jun 20 '24 13:06 lnicola

I've started getting an error, "expected ," on format! macros too...

Diggsey avatar Jun 20 '24 13:06 Diggsey

https://github.com/rust-lang/rust-analyzer/issues/17463, but it seems unlikely to affect format!.

lnicola avatar Jun 20 '24 13:06 lnicola

I get "expected `,`" as well

wackazong avatar Jun 20 '24 15:06 wackazong

I've triggered a new nightly release, you can try it in about 15 minutes. But I suspect it's going to fix this issue.

lnicola avatar Jun 20 '24 15:06 lnicola

New release is out, you can get it from GitHub or the VS Code Marketplace.

lnicola avatar Jun 20 '24 15:06 lnicola

Ok, works for me. Thanks. I will leave the issue open for @Diggsey to confirm.

wackazong avatar Jun 21 '24 12:06 wackazong