Skip to content

Allow forcing line breaks #2990

Open
Open
@vadimcn

Description

@vadimcn

Sometimes I want to insert line breaks in long expressions to better reflect their logical structure.
With clang-format this is possible by inserting a line-end comment at the desired break point (even if it's just an empty //).
As far as I can see, rustfmt just stops formatting such expressions altogether (is this a bug?). It strips empty comments, but that can be worked around with something like //..

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