-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Labels
I-style-nominatedNominated for discussion during a style team meeting.Nominated for discussion during a style team meeting.T-styleRelevant to the style team, which will review and decide on the PR/issue.Relevant to the style team, which will review and decide on the PR/issue.proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
Description
As originally discussed and described in rust-lang/style-team#196 (comment), we want to do the following:
- We want to say that whenever we wrap the
{to a new line, we always put the=>on the same line as the{rather than hanging it on the end of the previous line. In other words, "never break between the=>and the{". - We want to break the
=> {onto a new line if the pattern spans multiple lines and has indented continuation lines (because it has anifguard).
(2026-03-03:) Originally, there was a third rule proposed:
We want to always break a match arm body onto a new line if the pattern spans multiple lines (and thus always use braces for such a match arm, given the default setting ofmatch_arm_blocks).
In #152763 (comment), we decided not to do this one as part of this proposal.
cc @rust-lang/style
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
I-style-nominatedNominated for discussion during a style team meeting.Nominated for discussion during a style team meeting.T-styleRelevant to the style team, which will review and decide on the PR/issue.Relevant to the style team, which will review and decide on the PR/issue.proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.