Skip to content

Commit d402cd2

Browse files
committed
1 parent d8723aa commit d402cd2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ pub fn span_ends_with_comma(context: &RewriteContext, span: Span) -> bool {
15471547
for (kind, c) in CharClasses::new(context.snippet(span).chars()) {
15481548
match c {
15491549
_ if kind.is_comment() || c.is_whitespace() => continue,
1550-
')' | '}' => result = result && prev_char != c,
1550+
')' | '}' => result = result && prev_char != ')' && prev_char != '}',
15511551
',' => result = true,
15521552
_ => result = false,
15531553
}

tests/target/issue-2551.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mcro!(func(A {
2+
a: 12345667800111111111111,
3+
}));

0 commit comments

Comments
 (0)