Skip to content

Add formatting support for the asm! macro #6526

Open
@folkertdev

Description

@folkertdev

Given a snippet like this

unsafe fn foobar() {
    core::arch::asm!("{}", 
        const X)
}

I'd expect that to format to

unsafe fn foobar() {
    core::arch::asm!("{}", const X)
}

but instead nothing happens. Given that these operands are quite new, I suspect this is an oversight.

I'd happily look into fixing this, but I'm not 100% clear on whether the formatting behavior for existing code can be change? Though here I'd clearly consider it a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions