Skip to content

Newline added after block comment with trailing space #3423

Closed
@Xanewok

Description

@Xanewok

I think I hit #1177, here is a simple diff and some context:

root@20a4a53558f8:/# rustfmt --check file.rs
Diff in /file.rs at line 1:
-/**/
-fn main() {}
-
+/**/
+
+fn main() {}

root@20a4a53558f8:/# cat file.rs
/**/
fn main() {}

root@20a4a53558f8:/# rustfmt --version
rustfmt 1.0.3-nightly (d6829d6 2019-02-14) # Same thing happens with rustfmt 1.0.1-stable (be13559 2018-12-10)

What's important is that there is trailing whitespace after /**/ , which seems to be required to reproduce this issue.

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