mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 11:12:43 +00:00
Add test for empty tuple struct with comment
This commit is contained in:
parent
2e00c117e5
commit
93dae1a34d
@ -1029,7 +1029,7 @@ fn format_tuple_struct(context: &RewriteContext,
|
||||
result.push('(');
|
||||
let snippet = context.snippet(mk_sp(body_lo, context.codemap.span_before(span, ")")));
|
||||
if snippet.is_empty() {
|
||||
//
|
||||
// `struct S ()`
|
||||
} else if snippet
|
||||
.trim_right_matches(&[' ', '\t'][..])
|
||||
.ends_with('\n') {
|
||||
|
@ -166,7 +166,7 @@ struct Foo {
|
||||
|
||||
}
|
||||
struct Foo { /* comment */ }
|
||||
struct Foo();
|
||||
struct Foo( /* comment */ );
|
||||
|
||||
struct LongStruct {
|
||||
a: A,
|
||||
|
@ -170,7 +170,7 @@ struct Foo {
|
||||
// trailing space ->
|
||||
}
|
||||
struct Foo { /* comment */ }
|
||||
struct Foo();
|
||||
struct Foo( /* comment */ );
|
||||
|
||||
struct LongStruct {
|
||||
a: A,
|
||||
|
Loading…
Reference in New Issue
Block a user