File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -1229,6 +1229,48 @@ struct Dolor<T>
1229
1229
}
1230
1230
```
1231
1231
1232
+ ## ` match_arm_forces_newline `
1233
+
1234
+ Consistently put match arms (block based or not) in a newline.
1235
+
1236
+ - ** Default value** : ` false `
1237
+ - ** Possible values** : ` true ` , ` false `
1238
+
1239
+ #### ` false ` (default):
1240
+
1241
+ ``` rust
1242
+ match x {
1243
+ // a non-empty block
1244
+ X0 => {
1245
+ f ();
1246
+ }
1247
+ // an empty block
1248
+ X1 => {}
1249
+ // a non-block
1250
+ X2 => println! (" ok" ),
1251
+ }
1252
+ ```
1253
+
1254
+ #### ` true ` :
1255
+
1256
+ ``` rust
1257
+ match x {
1258
+ // a non-empty block
1259
+ X0 => {
1260
+ f ();
1261
+ }
1262
+ // an empty block
1263
+ X1 =>
1264
+ {}
1265
+ // a non-block
1266
+ X2 => {
1267
+ println! (" ok" )
1268
+ }
1269
+ }
1270
+ ```
1271
+
1272
+ See also: [ ` wrap_match_arms ` ] ( #wrap_match_arms ) .
1273
+
1232
1274
## ` match_block_trailing_comma `
1233
1275
1234
1276
Put a trailing comma after a block based match arm (non-block arms are not affected)
You can’t perform that action at this time.
0 commit comments