Skip to content

LHS/RHS Indentation changes for 2024 #198

Closed
@calebcartwright

Description

@calebcartwright

t-style decided quite some time back to include a change for the 2024 Style Edition that would provide better indentation when breaking around operators in certain contexts - rust-lang/rust#119838

We've been doing some testing of the implementation for that in rustfmt, and while this looks like a clear and solid win in assignments, it's produced more questionable results and some concerns in binary expression contexts.

I've shared some concerns and some snippets that hopefully help visualize the concerns in Zulip, and I've proposed that we either reduce the scope of the 2024 Edition rule change to only apply to assignments, or if we really want to do more for binary expressions that we at least narrow the scope to "simple" binary expressions and not try to apply the simple new indent-rhs-off-last-line-of-lhs rule on binary expression trees

https://rust-lang.zulipchat.com/#narrow/channel/346005-t-style/topic/lhs.2Frhs.20indentation.20change.20for.202024

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