rust-lang / rust-lang/rust-analyzer
Complete in macro_rules declaration location
Open
Nobody has claimed this yet.
A-completion
A-macro
C-feature
C-tracking-issue
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
macro_rules! foo {
($x:expr) => {$x + $0};
}
const NUM: i32 = 2;
const _: () = foo!(3);
- Complete paths after
$crate:: - Complete at token descend (
macro_rulesfirst expansion)- Complete expressions in
macro_rulesdeclaration body - Complete statements in
macro_rulesdeclaration body - Complete pattern in
macro_rulesdeclaration body
- Complete expressions in
- Complete at define site (decl macro 2.0)
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 macro_rules declaration location and the example showing completion after $0. Trace how rust-analyzer handles the first macro expansion and completion in expressions, statements, patterns, $crate paths, and declaration macro 2.0 define sites. Done means the checklist cases are supported and verified with corresponding completion coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100