Skip to content

rustfmt fails to format line containing long string literal #6718

@bombless

Description

@bombless
fn foo() {
    bar.baz({

dbg!("0123456789abcdef1123456789abcdef2123456789abcdef3123456789abcdef4123456789abcdef5123456")


});
}

for some reason rustfmt fails to format this code, while prettyplease can format it fine

I tested v1.6.0 and nightly, they all failed, so doesn't look like a new bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-stringsArea: string literalsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEI-poor-formattingIssue: poor formattingS-has-mcveStatus: a Minimal Complete and Verifiable Example has been found for this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions