Skip to content

Regression with wrap_comments=true #5862

@rwestphal

Description

@rwestphal

Hi all,

I've noticed a regression that happened between rustfmt 1.5.2-nightly (fe7454b 2023-06-19) and rustfmt 1.5.3-nightly (4651421 2023-06-20).

In my project [1], whenever I run cargo fmt, some comment lines are mangled unexpectedly. Here's the full diff: https://pastebin.com/raw/HwqgrCUz

If I disable wrap_comments=true in rustfmt.toml, the problem no longer occurs.

Interestingly, I couldn't reproduce the problem using a small demonstration program. It only happens when using rustfmt or cargo fmt in my project (which has around 75k LoC).

This is similar to #5835, but not quite the same problem.

Please let me know if you need more info to look into this.

[1] https://github.com/rwestphal/holo

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