You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Style Guide currently has differing guidance around whether to break before or after the assignment operator depending on whether the construct is a let statement (after) or a control flow expression (before)
rustfmt current behavior is thus a bug, in that rustfmt breaks after the operator even for control flow expressions. Regardless of what the guidance ends up being in the 2024 Style Edition, rustfmt's defaults will be sure to match.
However, the discover of this not-following-style-guide-by-default bug in rustfmt triggered some subsequent discussion that made it apparent t-style should at least consider potentially making an update as part of the 2024 Style Edition in an effort to be consistent (i.e. should the break be before the operator in statements as well? or should the break be after the operator in expressions?)
The text was updated successfully, but these errors were encountered:
calebcartwright
changed the title
2024 Edition Consideration: Consistency in breaks around assignment operator
2024 Style Edition Consideration: Consistency in breaks around assignment operator
Apr 5, 2023
The Style Guide currently has differing guidance around whether to break before or after the assignment operator depending on whether the construct is a let statement (after) or a control flow expression (before)
rustfmt current behavior is thus a bug, in that rustfmt breaks after the operator even for control flow expressions. Regardless of what the guidance ends up being in the 2024 Style Edition, rustfmt's defaults will be sure to match.
However, the discover of this not-following-style-guide-by-default bug in rustfmt triggered some subsequent discussion that made it apparent t-style should at least consider potentially making an update as part of the 2024 Style Edition in an effort to be consistent (i.e. should the break be before the operator in statements as well? or should the break be after the operator in expressions?)
Zulip discussion for reference: https://rust-lang.zulipchat.com/#narrow/stream/346005-t-style/topic/let-else.20formatting.20and.20control.20flow.20expressions
The text was updated successfully, but these errors were encountered: