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: src/tools/rustfmt/CHANGELOG.md
+5
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
## [Unreleased]
4
4
5
+
### Fixed
6
+
7
+
- Fixes issue where wrapped strings would be incorrectly indented in macro defs when `format_strings` was enabled [#4036](https://github.com/rust-lang/rustfmt/issues/4036)
8
+
5
9
## [1.4.38] 2021-10-20
6
10
7
11
### Changed
@@ -57,6 +61,7 @@ Note this hit the rustup distributions prior to the v1.4.38 release as part of a
57
61
58
62
- New `One` variant added to `imports_granularity` configuration option which can be used to reformat all imports into a single use statement [#4669](https://github.com/rust-lang/rustfmt/issues/4669)
59
63
- rustfmt will now skip files that are annotated with `@generated` at the top of the file [#3958](https://github.com/rust-lang/rustfmt/issues/3958)
64
+
if `format_generated_files` option is set to `false` (by default `@generated` files are formatted)
60
65
- New configuration option `hex_literal_case` that allows user to control the casing utilized for hex literals [PR #4903](https://github.com/rust-lang/rustfmt/pull/4903)
61
66
62
67
See the section on the configuration site for more information
Copy file name to clipboardexpand all lines: src/tools/rustfmt/Configurations.md
+37-1
Original file line number
Diff line number
Diff line change
@@ -930,6 +930,8 @@ fn add_one(x: i32) -> i32 {
930
930
931
931
Format generated files. A file is considered generated
932
932
if any of the first five lines contain a `@generated` comment marker.
933
+
By default, generated files are reformatted, i. e. `@generated` marker is ignored.
934
+
This option is currently ignored for stdin (`@generated` in stdin is ignored.)
933
935
934
936
-**Default value**: `true`
935
937
-**Possible values**: `true`, `false`
@@ -2198,13 +2200,47 @@ specific version of rustfmt is used in your CI, use this option.
2198
2200
-**Possible values**: any published version (e.g. `"0.3.8"`)
2199
2201
-**Stable**: No (tracking issue: [#3386](https://github.com/rust-lang/rustfmt/issues/3386))
2200
2202
2203
+
## `short_array_element_width_threshold`
2204
+
2205
+
The width threshold for an array element to be considered "short".
2206
+
2207
+
The layout of an array is dependent on the length of each of its elements.
2208
+
If the length of every element in an array is below this threshold (all elements are "short") then the array can be formatted in the mixed/compressed style, but if any one element has a length that exceeds this threshold then the array elements will have to be formatted vertically.
2209
+
2210
+
-**Default value**: `10`
2211
+
-**Possible values**: any positive integer that is less than or equal to the value specified for [`max_width`](#max_width)
0 commit comments