Skip to content

Weird formatting of asm! statement within macro definition #2770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
IsaacWoods opened this issue Jun 5, 2018 · 0 comments · Fixed by #2775
Closed

Weird formatting of asm! statement within macro definition #2770

IsaacWoods opened this issue Jun 5, 2018 · 0 comments · Fixed by #2775

Comments

@IsaacWoods
Copy link

IsaacWoods commented Jun 5, 2018

Niche use-case maybe, but this is what the current nightly rustfmt (rustfmt 0.8.2-nightly (173ae0d 2018-05-28)) produces:

macro_rules! save_regs {
    () => {
        asm!("push rax
              push rcx
              push rdx
              push rsi
              push rdi
              push r8
              push r9
              push r10
              push r11"
                                     :::: "intel", "volatile");
    };
}

Specifically, the indentation before the colons seems excessive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants