rust-lang / rust-lang/rust-analyzer
Function named "async" in non-2018 crate causes error
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I'm working on a PR for https://github.com/BurntSushi/ripgrep and rust analyser is showing Syntax Error: expected a name
for this function. I think the function name being a reserved keyword (async) in post 2018 Rust is causing this - however "async" is a legal item name in pre-2018 Rust - https://doc.rust-lang.org/reference/keywords.html
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 function at crates/cli/src/process.rs line 234 in the linked ripgrep revision, using its pre-2018 crate context to reproduce the syntax error. Trace how rust-analyzer parses the reserved keyword as an item name, and verify that the function no longer produces a syntax error in the reported context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100