Skip to content

Unexpected string literal indents #2695

Closed
@choubacha

Description

Rust 1.26 was just released and it appears to have changed some aspect of rustfmt as well. I ran cargo fmt on my repo (/~https://github.com/kbacha/stellar-sdk) and pushed the changes. However, it failed on CI because of a format issue. We run a format check so that we don't merge poorly formatted code:
https://travis-ci.org/kbacha/stellar-sdk/builds/377478444?utm_source=github_status&utm_medium=notification

image

I went local again and ran cargo fmt again and got:

image
and again:
image

Then I moved to another repo and recreated it here:
/~https://github.com/kbacha/cargo-fmt-err-1-26

It appears to only matter inside a macro_rules as far as I can tell.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions