You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Configurations.md
+36
Original file line number
Diff line number
Diff line change
@@ -1862,6 +1862,42 @@ fn foo() {
1862
1862
}
1863
1863
```
1864
1864
1865
+
## `match_arm_indent`
1866
+
1867
+
Controls whether match arms are indented. If disabled, match arms will be formatted at the same indentation level as the outer `match` statement. Meaning that match blocks will only be indented once, not twice.
1868
+
1869
+
-**Default value**: `true`
1870
+
-**Possible values**: `true`, `false`
1871
+
-**Stable**: No (TODO tracking issue)
1872
+
1873
+
#### `true` (default):
1874
+
1875
+
```rust
1876
+
fnmain() {
1877
+
matchvalue {
1878
+
Enum::A=> {
1879
+
letmutwork=first();
1880
+
work+=second();
1881
+
}
1882
+
Enum::B=>short_work(),
1883
+
}
1884
+
}
1885
+
```
1886
+
1887
+
#### `false`:
1888
+
1889
+
```rust
1890
+
fnmain() {
1891
+
matchvalue {
1892
+
Enum::A=> {
1893
+
letmutwork=first();
1894
+
work+=second();
1895
+
}
1896
+
Enum::B=>short_work(),
1897
+
}
1898
+
}
1899
+
```
1900
+
1865
1901
## `match_block_trailing_comma`
1866
1902
1867
1903
Put a trailing comma after a block based match arm (non-block arms are not affected)
0 commit comments