Fix pnc args multiine in the presence of final comments

This commit is contained in:
Joshua Warner 2025-01-08 21:25:39 -08:00
parent 158691fb27
commit 0438c17503
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 40 additions and 5 deletions

View file

@ -521,10 +521,7 @@ pub fn expr_is_multiline(me: &Expr<'_>, comments_only: bool) -> bool {
.any(|loc_arg| expr_is_multiline(&loc_arg.value, comments_only))
}
Expr::PncApply(loc_expr, args) => {
expr_is_multiline(&loc_expr.value, comments_only)
|| args
.iter()
.any(|loc_arg| expr_is_multiline(&loc_arg.value, comments_only))
expr_is_multiline(&loc_expr.value, comments_only) || is_collection_multiline(args)
}
Expr::DbgStmt { .. } => true,