Skip to content

Strange comment formatting #3937

Closed
Closed
@ghost

Description

$ rustfmt --version
rustfmt 1.4.9-nightly (33e3667 2019-10-07)

Code:

struct Foo {
    // a: i32,
    //
    // b: i32,
}

Formatting with rustfmt foo.rs:

struct Foo {
    // a: i32,
//
// b: i32,
}

I expected rustfmt to leave the code unmodified.


Code:

struct Foo {
    a: i32,
    //
    // b: i32,
}

Formatting with rustfmt format_code_in_doc_comments=true src/foo.rs:

struct Foo {
    a: i32,
    /*
     * b: i32, */
}

I expected rustfmt to leave the code unmodified.

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