Skip to content

Multiline comment inside struct get unidented  #4976

@Thomasdezeeuw

Description

@Thomasdezeeuw

Take the following code:

struct MyStruct {
    /* Some comment.
    /// Some field
    some_field: Option<String>,
    */
}

Looks reasonable to me, but rustfmt changes it to the following:

struct MyStruct {
    /* Some comment.
/// Some field
some_field: Option<String>,
*/}

Version:

rustfmt 1.4.37-stable (a178d032 2021-07-26)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions