mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
Use tactic instead of config
Add mixed test Mixed is unreachable as there is no input combination that could get to this value
This commit is contained in:
parent
e44a7a2800
commit
b3f41e82fc
@ -1335,9 +1335,10 @@ fn rewrite_struct_lit<'a>(context: &RewriteContext,
|
||||
},
|
||||
indent: indent,
|
||||
width: budget,
|
||||
ends_with_newline: match context.config.struct_lit_style {
|
||||
StructLitStyle::Block => true,
|
||||
StructLitStyle::Visual => false,
|
||||
ends_with_newline: match tactic {
|
||||
DefinitiveListTactic::Horizontal => false,
|
||||
DefinitiveListTactic::Vertical => true,
|
||||
DefinitiveListTactic::Mixed => unreachable!(),
|
||||
},
|
||||
config: context.config,
|
||||
};
|
||||
|
@ -110,4 +110,7 @@ fn issue491() {
|
||||
Foo {
|
||||
arm: 0, // Comment
|
||||
};
|
||||
|
||||
Foo { a: aaaaaaaaaa, b: bbbbbbbb, c: cccccccccc, d: dddddddddd, /* a comment */
|
||||
e: eeeeeeeee };
|
||||
}
|
||||
|
@ -140,4 +140,12 @@ fn issue491() {
|
||||
};
|
||||
|
||||
Foo { arm: 0 /* Comment */ };
|
||||
|
||||
Foo {
|
||||
a: aaaaaaaaaa,
|
||||
b: bbbbbbbb,
|
||||
c: cccccccccc,
|
||||
d: dddddddddd, // a comment
|
||||
e: eeeeeeeee,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user