mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 12:36:47 +00:00
commit
374dba833e
@ -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…
Reference in New Issue
Block a user