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:
parent
f4171e97eb
commit
0c8640a84f
1 changed files with 6 additions and 1 deletions
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue