Force newline for multi-line closures where the inner element is not outdentable

This commit is contained in:
Joshua Warner 2025-01-01 14:46:13 -05:00
parent 14d6f7c92a
commit f721569421
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
7 changed files with 166 additions and 109 deletions

View file

@ -2016,6 +2016,7 @@ fn fmt_closure<'a>(
loc_ret.format_with_options(buf, Parens::NotNeeded, Newlines::Yes, indent);
}
_ => {
buf.ensure_ends_with_newline();
loc_ret.format_with_options(buf, Parens::NotNeeded, Newlines::Yes, body_indent);
}
}