Skip to content

comment in let statement prevents formatting #5590

Open
@mfurak

Description

@mfurak

When running the rustfmt on a line that contains a block comment, the lines doesn't get formatted at all. My expectation is that the line gets formatted correctly as if the comment block wasn't there.
rustfmt version: rustfmt 1.5.1-stable
Test case:

fn main() {
    let tup = (1, 2);
    let (first,         second)/* your pattern here */ = tup;
}

Expectation:

fn main() {
    let tup = (1, 2);
    let (first, second)/* your pattern here */ = tup;
}

Actual:

fn main() {
    let tup = (1, 2);
    let (first,         second)/* your pattern here */ = tup;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions