diff --git a/src/expr.rs b/src/expr.rs index 7dfa4d57b13..33add30c7c6 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1629,7 +1629,10 @@ fn rewrite_struct_lit<'a>( nested_shape, tactic, context, - force_no_trailing_comma || has_base || !context.use_block_indent(), + force_no_trailing_comma + || has_base + || !context.use_block_indent() + || matches!(struct_rest, ast::StructRest::Rest(_)), ); write_list(&item_vec, &fmt)?