Skip to content

Commit

Permalink
Close #2551
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhdu committed Mar 22, 2018
1 parent d8723aa commit d402cd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/expr.rs
Expand Up @@ -1547,7 +1547,7 @@ pub fn span_ends_with_comma(context: &RewriteContext, span: Span) -> bool {
for (kind, c) in CharClasses::new(context.snippet(span).chars()) {
match c {
_ if kind.is_comment() || c.is_whitespace() => continue,
')' | '}' => result = result && prev_char != c,
')' | '}' => result = result && prev_char != ')' && prev_char != '}',
',' => result = true,
_ => result = false,
}
Expand Down
3 changes: 3 additions & 0 deletions tests/target/issue-2551.rs
@@ -0,0 +1,3 @@
mcro!(func(A {
a: 12345667800111111111111,
}));

0 comments on commit d402cd2

Please sign in to comment.