Skip to content

Inline assembly has no semantic highlighting #21254

@lewisfm

Description

@lewisfm

Inline assembly doesn't have any semantic highlighting, even though this was added in #6031.

All asm!()/global_asm/naked_asm calls are just highlighted as strings.

Image

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 (f5a83fb 2025-12-11)

rustc version: rustc 1.92.0-nightly (7ac0330 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
        ");
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions