rust-lang / rust-lang/rust-analyzer
Inline assembly has no semantic highlighting
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Inline assembly doesn't have any semantic highlighting, even though this was added in https://github.com/rust-lang/rust-analyzer/issues/6031.
All asm!()/global_asm/naked_asm calls are just highlighted as strings.
It's possible I am missing some sort of configuration option, but I haven't seen anything of the sort in the rust-analyzer settings.
rust-analyzer version: 0.4.2715-standalone (f5a83fb3b5 2025-12-11)
rustc version: rustc 1.92.0-nightly (7ac0330c6 2025-09-25)
editor or extension: VS Code 1.106.3, RA extension 0.4.2715, Theme: Default Dark Modern
relevant settings: Rust target is aarch64-apple-darwin, but I've tested on multiple
code snippet to reproduce:
use std::arch::asm;
fn main() {
unsafe {
asm!("
@ Perform a nop instruction.
nop
");
}
}
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 Rust snippet in the issue and reproduce the highlighting for asm!(), global_asm, and naked_asm in the listed VS Code and rust-analyzer versions. Trace the semantic-highlighting path for these calls and compare it with the behavior described in issue 6031. Done means inline assembly is highlighted semantically rather than entirely as strings, with the relevant behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100