Fix last comment turning into block comment

This fixes the comment after the last argument in an argument list
being turned into a block comment when it's not necessary.
This commit is contained in:
Ari Koivula 2016-03-13 23:27:13 +02:00
parent f4171e97eb
commit 0c8640a84f

View file

@ -1370,13 +1370,18 @@ fn rewrite_args(context: &RewriteContext,
_ => multi_line_budget,
};
let end_with_newline = match context.config.fn_args_layout {
StructLitStyle::Block => true,
_ => false,
};
let fmt = ListFormatting {
tactic: tactic,
separator: ",",
trailing_separator: SeparatorTactic::Never,
indent: indent,
width: budget,
ends_with_newline: false,
ends_with_newline: end_with_newline,
config: context.config,
};