rust-lang / rust-lang/rust-analyzer
False macro expansion error in `lazy_static_include_bytes`
Open
Nobody has claimed this yet.
A-macro
Broken Window
C-bug
E-unknown
S-actionable
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
This macro call fails to expand for me:
I think this is related to $vis token producing an empty match, as the following works:
pub RES => "res/test_accounts.csv"
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 by reproducing the failure at csv_parser.rs lines 345-347 in the linked nearcore revision, comparing it with the working pub RES form. Then trace rust-analyzer's lazy_static_include_bytes macro expansion around the suspected empty $vis match; done means the original invocation expands successfully without the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100