Add more tests for struct_field_align_threshold and trailing_comma
This commit is contained in:
parent
ee130515e3
commit
ab9f2a8ac7
14
tests/source/issue-4791/trailing_comma.rs
Normal file
14
tests/source/issue-4791/trailing_comma.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// rustfmt-struct_field_align_threshold: 30
|
||||
// rustfmt-trailing_comma: Always
|
||||
|
||||
struct Foo {
|
||||
group_a: u8,
|
||||
|
||||
group_b: u8
|
||||
}
|
||||
|
||||
struct Bar {
|
||||
group_a: u8,
|
||||
|
||||
group_b: u8,
|
||||
}
|
8
tests/target/issue-4791/no_trailing_comma.rs
Normal file
8
tests/target/issue-4791/no_trailing_comma.rs
Normal file
@ -0,0 +1,8 @@
|
||||
// rustfmt-struct_field_align_threshold: 0
|
||||
// rustfmt-trailing_comma: Never
|
||||
|
||||
pub struct Baz {
|
||||
group_a: u8,
|
||||
|
||||
group_b: u8
|
||||
}
|
14
tests/target/issue-4791/trailing_comma.rs
Normal file
14
tests/target/issue-4791/trailing_comma.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// rustfmt-struct_field_align_threshold: 30
|
||||
// rustfmt-trailing_comma: Always
|
||||
|
||||
struct Foo {
|
||||
group_a: u8,
|
||||
|
||||
group_b: u8,
|
||||
}
|
||||
|
||||
struct Bar {
|
||||
group_a: u8,
|
||||
|
||||
group_b: u8,
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user