Skip to content

Commit aafb9a6

Browse files
committed
Add more tests for struct_field_align_threshold and trailing_comma
1 parent c0f1155 commit aafb9a6

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed
File renamed without changes.

Diff for: tests/source/issue-4791/trailing_comma.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// rustfmt-struct_field_align_threshold: 30
2+
// rustfmt-trailing_comma: Always
3+
4+
struct Foo {
5+
group_a: u8,
6+
7+
group_b: u8
8+
}
9+
10+
struct Bar {
11+
group_a: u8,
12+
13+
group_b: u8,
14+
}
File renamed without changes.

Diff for: tests/target/issue-4791/no_trailing_comma.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// rustfmt-struct_field_align_threshold: 0
2+
// rustfmt-trailing_comma: Never
3+
4+
pub struct Baz {
5+
group_a: u8,
6+
7+
group_b: u8
8+
}

Diff for: tests/target/issue-4791/trailing_comma.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// rustfmt-struct_field_align_threshold: 30
2+
// rustfmt-trailing_comma: Always
3+
4+
struct Foo {
5+
group_a: u8,
6+
7+
group_b: u8,
8+
}
9+
10+
struct Bar {
11+
group_a: u8,
12+
13+
group_b: u8,
14+
}

0 commit comments

Comments
 (0)