rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
13.81k stars 1.53k forks source link

Incorrect macro parsing error #17465

Open wackazong opened 2 weeks ago

wackazong commented 2 weeks ago

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.

lnicola commented 2 weeks ago

What error do you get, "missing ,"?

Diggsey commented 2 weeks ago

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

lnicola commented 2 weeks ago

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

wackazong commented 2 weeks ago

I get "expected `,`" as well

lnicola commented 2 weeks ago

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 commented 2 weeks ago

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

wackazong commented 2 weeks ago

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