Skip to content

Macro error: expected Expr #19168

Open
Open
@colinmarc

Description

@colinmarc

rust-analyzer version: rust-analyzer 1.84.1 (e71f9a9 2025-01-27)

rustc version: rustc 1.84.1 (e71f9a9a9 2025-01-27)

editor or extension: zed or nvim

Image

I'm getting an LSP error on a macro that compiles fine. The issue is reproducible on commit ba3f8bce2749329d2b02922d7637e8546c5eb81b of https://github.com/colinmarc/magic-mirror.

Here is the macro invocation that rust-analyzer doesn't like:

https://github.com/colinmarc/magic-mirror/blob/ba3f8bce2749329d2b02922d7637e8546c5eb81b/mm-server/src/encoder/h264.rs#L22-L28

And here is where the macro lives:

https://github.com/colinmarc/magic-mirror/blob/ba3f8bce2749329d2b02922d7637e8546c5eb81b/mm-server/src/vulkan/chain.rs#L28

Please ignore how insane the macro is 😓 Building the project is also a bit of a hassle, sorry about that. It requires linux and cmake nasm protoc libxkbcommon-dev. Detailed build instructions here: https://colinmarc.github.io/magic-mirror/setup/server/#building-mmserver-from-source

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macromacro expansionC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions