rust-lang / rust-lang/rust-analyzer
Failed to expand macro: a procedural macro error occurred unsupported proc macro punctuation character '['
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: 2024-12-30
rustc version: rustc 1.82.0 (f6e511eec 2024-10-15)
editor or extension: VSCode 1.96
relevant settings: All to standard
repository link (if public, optional): https://github.com/ProbablyClem/utoipauto
code snippet to reproduce:
#[utoipauto]
#[derive(Debug, OpenApi)]
#[openapi(info(title = "Generic Test Api"))]
pub(crate) struct ApiDoc;
Rust analyzer thinks that some punctuation error was made but there isn't one.
cargo build finishes without normally.
The issue is the utoipauto macro but I do not know why this is happening.
Here is the issue for the utoipauto repository:
https://github.com/ProbablyClem/utoipauto/issues/46
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Rust snippet and the referenced utoipauto repository, then compare rust-analyzer's diagnostic with the result from cargo build. Check the linked utoipauto issue for additional context; done means the valid procedural macro no longer produces the unsupported '[' punctuation error, or the issue is narrowed to a documented incompatibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100