rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.17k stars 12.7k forks source link

Tracking Issue for Rust 2024: rustfmt assignment operators rhs indentation #132380

Open calebcartwright opened 2 days ago

calebcartwright commented 2 days ago

This is a tracking issue for changing the indentation level used in formatting assignment/op expressions where the left hand side expression has to be formatted across multiple lines, with the style/formatting changing to indent the right hand side expression relative to the last line of the left hand side expression

About tracking issues

Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

None.

Implementation history

cc @rust-lang/rustfmt @rust-lang/style

calebcartwright commented 2 days ago

the Style and Rustfmt teams are already aware of this, but given the late date I will note for transparency that we do already have this "implemented" in rustfmt and have been doing some testing on it (and it's that testing that surfaced some formatting diffs that led to us winding back the operators where the new rule should be applied).

I am intentionally going to keep the impl-incomplete label here though until we get the PR merged in