Fix formatting of backpassing in a nested def with no newline

Fixes #4338
This commit is contained in:
Joshua Warner 2023-01-16 09:30:51 -08:00
parent fb0668f13b
commit d876abb04b
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 112 additions and 1 deletions

View file

@ -420,7 +420,7 @@ pub fn fmt_body<'a, 'buf>(
);
}
}
Expr::Defs(..) | Expr::BinOps(_, _) => {
Expr::Defs(..) | Expr::BinOps(_, _) | Expr::Backpassing(..) => {
// Binop chains always get a newline. Otherwise you can have things like:
//
// something = foo