mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
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:
+6
-1
@@ -1370,13 +1370,18 @@ enum ArgumentKind<'a> {
|
||||
_ => 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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user