Skip to content

Commit b1a6dd6

Browse files
committed
Cargo fmr & update tests
Note that we are forcing vertical layout when there are attributes on top of a variant.
1 parent 8ef5429 commit b1a6dd6

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/bin/rustfmt.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ enum Operation {
4545
/// Print detailed configuration help.
4646
ConfigHelp,
4747
/// Output default config to a file, or stdout if None
48-
ConfigOutputDefault { path: Option<String> },
48+
ConfigOutputDefault {
49+
path: Option<String>,
50+
},
4951
/// No file specified, read from stdin
5052
Stdin {
5153
input: String,

tests/target/enum.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ enum StructLikeVariants {
4444
// Pre-comment
4545
#[Attr50] y: SomeType, // Aanother Comment
4646
},
47-
SL { a: A },
47+
SL {
48+
a: A,
49+
},
4850
}
4951

5052
enum X {
@@ -65,7 +67,10 @@ pub enum EnumWithAttributes {
6567
SkippedItem(String,String,), // Post-comment
6668
#[another_attr]
6769
#[attr2]
68-
ItemStruct { x: usize, y: usize }, /* Comment AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA */
70+
ItemStruct {
71+
x: usize,
72+
y: usize,
73+
}, /* Comment AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA */
6974
// And another
7075
ForcedPreflight, /* AAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
7176
* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA */

0 commit comments

Comments
 (0)