Merge pull request #2552 from alanhdu/master

Close #2551
This commit is contained in:
Nick Cameron 2018-03-22 18:04:31 +13:00 committed by GitHub
commit 374dba833e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -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,
}

View File

@ -13,8 +13,8 @@
use std::iter::repeat;
use config::lists::*;
use syntax::{ast, ptr};
use syntax::codemap::{BytePos, Span};
use syntax::{ast, ptr};
use codemap::SpanUtils;
use comment::combine_strs_with_missing_comments;

View File

@ -0,0 +1,3 @@
mcro!(func(A {
a: 12345667800111111111111,
}));