commit
374dba833e
3 changed files with 5 additions and 2 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
3
tests/target/issue-2551.rs
Normal file
3
tests/target/issue-2551.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
mcro!(func(A {
|
||||
a: 12345667800111111111111,
|
||||
}));
|
Loading…
Add table
Add a link
Reference in a new issue