rust-lang / rust-lang/rust-analyzer
Code complete does not work with `cfg_attr` attribute
Open
Nobody has claimed this yet.
A-completion
C-feature
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Code complete does not work with the cfg_attr attribute, but it works fine with the cfg attribute.
- Code complete for
predicate
#[cfg_attr(target_arch = "x86_64", inline(always))]
// ^^^^^^^^^^^^^^^^^^^^^^ // code complete for predicate
fn test() {}
- Code complete for
attrincfg_attr
#[cfg_attr(target_arch = "x86_64", inline(always))]
// ^^^^^^^^^^^^^^ // code complete for attr in cfg_attr
fn test() {}
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
Reproduce the two code-completion cases in the issue: the predicate and attribute positions in a Rust cfg_attr expression, comparing them with cfg. Trace the code-completion entry point for attributes and verify that both positions provide completion results for cfg_attr.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100