Skip to content

Add let_chain_style configuration option#5983

Open
ytmimi wants to merge 1 commit into
rust-lang:mainfrom
ytmimi:let_chain_style
Open

Add let_chain_style configuration option#5983
ytmimi wants to merge 1 commit into
rust-lang:mainfrom
ytmimi:let_chain_style

Conversation

@ytmimi

@ytmimi ytmimi commented Dec 17, 2023

Copy link
Copy Markdown
Contributor

This is a follow up to #5910, which added support for let-chains.

Now users have some control over how let-chains are formatted. The default value of LegibleBindings follows the style guide prescription defined in r-l/rust#110568. The Tall variant provides users an option to format all chain items on a single line if they fit.

Happy to bike shed on the variant names, but I wanted to get the ball rolling on the new configuration.

r? @calebcartwright

Now users have some control over how `let-chains` are formatted. The
default value of `LegibleBindings` follows the style guide prescription
defined in `r-l/rust 110568`. The `Tall` variant provides users an
option to format all chain items on a single line if they fit.
@awused

awused commented Aug 6, 2025

Copy link
Copy Markdown

This one would be really nice to have, as rustfmt currently explodes even the most trivial let chains into three lines unconditionally.

@jieyouxu jieyouxu added S-waiting-on-review Status: awaiting review from the assignee but also interested parties. and removed pr-not-reviewed labels Feb 23, 2026
@rustbot

rustbot commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #6823) made this pull request unmergeable. Please resolve the merge conflicts.

@Keith-Cancel

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants