Skip to content

Conversation

@ayazhafiz
Copy link
Contributor

#3891 removed Version One formatting that did this correctly (https://github.com/rust-lang/rustfmt/pull/3891/files#diff-5db152a52bdaeae9dacd35f43a4a78ddL2342-L2344),
but at seemingly at the time there were no tests to catch the
regression.

This commit fix-forwards the formatting regression, though via a different
implementation because the original implementation would muddle the branch
for visual indentation and this fix, which is probably not preferrable
giving the existing complexity of the rewrite_required_fn method.

Closes #4366

 rust-lang#3891 removed Version One formatting that did this correctly (https://github.com/rust-lang/rustfmt/pull/3891/files#diff-5db152a52bdaeae9dacd35f43a4a78ddL2342-L2344),
but at seemingly at the time there were no tests to catch the
regression.

This commit fix-forwards the formatting regression, though via a different
implementation because the original implementation would muddle the branch
for visual indentation and this fix, which is probably not preferrable
giving the existing complexity of the rewrite_required_fn method.

Closes rust-lang#4366
Copy link
Contributor

@ahl ahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; thanks for fixing this.

@calebcartwright
Copy link
Member

Thanks @ayazhafiz!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2.0.0-rc.2 formatting regression with line-wrapped functions

4 participants