rust-lang / rust-lang/rust-analyzer
Rust-analyzer vscode extension : missing codes under macro in Outline
Open
Nobody has claimed this yet.
A-ide
C-feature
E-medium
S-actionable
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Example of code from tokio below, the codes wrapped in macro cfg_rt is not visible in vscode Outline. I have set rust-analyzer.cargo.features: "all"
cfg_rt! {
pub fn spawn_local<F>(future: F) -> JoinHandle<F::Output>
where
F: Future + 'static,
F::Output: 'static,
{
spawn_local_inner(future, None)
}
}
macro_rules! cfg_rt {
($($item:item)*) => {
$(
#[cfg(feature = "rt")]
#[cfg_attr(docsrs, doc(cfg(feature = "rt")))]
$item
)*
}
}
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 issue in the VS Code Outline using the tokio example, the cfg_rt! macro, and rust-analyzer.cargo.features set to "all". Compare which items appear inside and outside the macro; done means the Rust items wrapped by cfg_rt! are visible in the Outline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100