Skip to content

rustfmt removes oddly placed comments #52444

Closed
@zacheryph

Description

@zacheryph

rustfmt likes to remove commented lines that are found in odd places. This appears to affect both stable and nightly rustfmt.

Input File

struct X<T>
// where
//     T: Clone
{
    inner: String,
}

After rustfmt

struct X<T> {
    inner: String,
}

Metadata

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