[Rust] macro expansion failed warnings 2
Description of the issue
Similarly to https://github.com/github/codeql/issues/19966 I'm also hitting quite a few macro expansion failed warnings:
WARN /home/sg/dev/cosmwasm/contracts/ibc-reflect/src/msg.rs:14:21: macro expansion failed: the macro 'vec' expands to ERROR but a Expr was expected
As I don't know whether the bugs share a common root cause, I'm opening this issue.
Reproduction steps
git clone https://github.com/CosmWasm/cosmwasm.git
git checkout cf413c5ad6a58a87e0be894584f01506f3b2e0af^
codeql database create --language=rust "cosmwasm-db-cf413c5ad6a58a87e0be894584f01506f3b2e0af^" --overwrite
Files
database-create-20250701.203330.097.log database-index-files-20250701.203333.834.log cosmwasm-db-cf413c5ad6a58a87e0be894584f01506f3b2e0af^.zip
Hi @intrigus-lgtm
Thanks for the report. I'll let the engineering team know about the issue.
Hi @intrigus-lgtm, thanks for reaching out about this! As far as I could test, seems like this is an upstream issue with rust-analyzer, as can be highlighted by opening the contracts/ibc-reflect directory in VSCode with the rust-analyzer plugin:
(opening the cosmwasm directory doesn't index that crate because it is explicitly excluded from the root workspace).
I'll file an issue about this.
Hi @intrigus-lgtm, thanks for reaching out about this! As far as I could test, seems like this is an upstream issue with rust-analyzer, as can be highlighted by opening the
contracts/ibc-reflectdirectory in VSCode with the rust-analyzer plugin:
Ah, yes I could have checked that, but I would not have expected rust-analyzer to fail.
I'll file an issue about this.
Did you already do? If so, do you already have a reducer? If not, I may try to create a reproducer :)
EDIT: https://github.com/rust-lang/rust-analyzer/issues/20191 and https://github.com/rust-lang/rust-analyzer/issues/20191#issuecomment-3046541217 🙂
The fix has been merged to rust-analyzer 🎉 https://github.com/rust-lang/rust-analyzer/pull/20164