]> git.lizzy.rs Git - rust.git/blob - CHANGELOG.md
Do not insert spaces around braces with empty body or multiple lines
[rust.git] / CHANGELOG.md
1 # Changelog
2
3 ## [Unreleased]
4
5 ## [0.4.1] 2018-03-16
6
7 ### Added
8
9 - Add `ignore` configuration option.
10 - Add `license_template_path` configuration option.
11 - Format `lazy_static!`.
12
13 ### Fixed
14
15 - Fix formatting bugs.
16 - Fix setting `reorder_modules` removing inline modules.
17 - Format attributes on block expressions.
18 - Support `dyn trait` syntax.
19 - Support multiple patterns in `if let` and `while let`.
20 - Support a pattern with parentheses.
21
22 ## [0.4.0] 2018-03-02
23
24 ### Changed
25
26 - Do not print verbose outputs when formatting with stdin.
27 - Preserve trailing whitespaces in doc comments.
28 - Scale the values of width heuristics by `max_width`.
29
30 ### Fixed
31
32 - Do not reorder items with `#[macro_use]`.
33 - Fix formatting bugs.
34 - Support the beginning `|` on a match arm.
35
36 ## [0.3.8] 2018-02-04
37
38 ### Added
39
40 - Format (or at least try to format) `macro_rules!`.
41
42 ## [0.3.7] 2018-02-01
43
44 ### Added
45
46 - Add `use_field_init_shorthand` config option.
47 - Add `reorder_modules` configuration option.
48
49 ## [0.3.6] 2018-01-18
50
51 ### Fixed
52
53 - Fix panicking on formatting certain macros (#2371).
54
55 ## [0.3.5] 2018-01-15
56
57 ### Changed
58
59 - Format code block in comments when `wrap_comments` is set to `true`.
60 - Remove `same_line_attributes` configuration option.
61 - Rename `git-fmt` to `git-rustfmt`.
62
63 ### Fixed
64
65 - Rustup to `rustc 1.25.0-nightly (e6072a7b3 2018-01-13)`.
66 - Fix formatting bugs.
67
68 ## [0.3.4] 2017-12-23
69
70 ### Added
71
72 - Add `--version` flag to `cargo-fmt`, allow `cargo fmt --version`.
73
74 ### Fixed
75
76 - Rustup to `rustc 1.24.0-nightly (5165ee9e2 2017-12-22)`.
77
78 ## [0.3.3] 2017-12-22
79
80 ### Added
81
82 - Format trait aliases.
83
84 ### Changed
85
86 - `cargo fmt` will format every workspace member.
87
88 ### Fixed
89
90 - Rustup to `rustc 1.24.0-nightly (250b49205 2017-12-21)`
91 - Fix formatting bugs.
92
93 ## [0.3.2] 2017-12-15
94
95 ### Changed
96
97 - Warn when unkown configuration option is used.
98
99 ### Fixed
100
101 - Rustup to `rustc 1.24.0-nightly (0077d128d 2017-12-14)`.
102
103 ## [0.3.1] 2017-12-11
104
105 ### Added
106
107 - Add `error_on_unformatted` configuration option.
108 - Add `--error-on-unformatted` command line option.
109
110 ### Changed
111
112 - Do not report formatting errors on comments or strings by default.
113 - Rename `error_on_line_overflow_comments` to `error_on_unformatted`.
114
115 ### Fixed
116
117 - Fix formatting bugs.
118 - Fix adding a trailing whitespace inside code block when `wrap_comments = true`.
119
120 ## [0.3.0] 2017-12-11
121
122 ### Added
123
124 - Support nested imports.
125
126 ### Changed
127
128 - Do not report errors on skipped items.
129 - Do not format code block inside comments when `wrap_comments = true`.
130 - Keep vertical spaces between items within range.
131 - Format `format!` and its variants using compressed style.
132 - Format `write!` and its variants using compressed style.
133 - Format **simple** array using compressed style.
134
135 ### Fixed
136
137 - Fix `rustfmt --package package_name` not working properly.
138 - Fix formatting bugs.
139
140 ## [0.2.17] 2017-12-03
141
142 ### Added
143
144 - Add `blank_lines_lower_bound` and `blank_lines_upper_bound` configuration options.
145
146 ### Changed
147
148 - Combine configuration options related to width heuristic into `width_heuristic`.
149 - If the match arm's body is `if` expression, force to use block.
150
151 ### Fixed
152
153 - Fix `cargo fmt --all` being trapped in an infinite loop.
154 - Fix many formatting bugs.
155
156 ### Removed
157
158 - Remove legacy configuration options.
159
160 ## [0.2.16] 2017-11-21
161
162 ### Added
163
164 - Remove empty lines at the beginning of the file.
165 - Soft wrapping on doc comments.
166
167 ### Changed
168
169 - Break before `|` when using multiple lines for match arm patterns.
170 - Combine `control_style`, `where_style` and `*_indent` config options into `indent_style`.
171 - Combine `item_brace_style` and `fn_brace_style` config options into `brace_style`.
172 - Combine config options related spacing around colons into `space_before_colon` and `space_after_colon`.
173
174 ### Fixed
175
176 - Fix many bugs.
177
178 ## [0.2.15] 2017-11-08
179
180 ### Added
181
182 - Add git-fmt tool
183 - `where_single_line` configuration option.
184
185 ### Changed
186
187 - Rename `chain_one_line_max` to `chain_width`.
188 - Change the suffix of indent-related configuration options to `_indent`.
189
190 ## [0.2.14] 2017-11-06
191
192 ### Fixed
193
194 - Rustup to the latest nightly.
195
196 ## [0.2.13] 2017-10-30
197
198 ### Fixed
199
200 - Rustup to the latest nightly.
201
202 ## [0.2.12] 2017-10-29
203
204 ### Fixed
205
206 - Fix a bug that `cargo fmt` hangs forever.
207
208 ## [0.2.11] 2017-10-29
209
210 ### Fixed
211
212 - Fix a bug that `cargo fmt` crashes.
213
214 ## [0.2.10] 2017-10-28
215
216 ## [0.2.9] 2017-10-16
217
218 ## [0.2.8] 2017-09-28
219
220 ## [0.2.7] 2017-09-21
221
222 ### Added
223
224 - `binop_separator` configuration option (#1964).
225
226 ### Changed
227
228 - Use horizontal layout for function call with a single argument.
229
230 ### Fixed
231
232 - Fix panicking when calling `cargo fmt --all` (#1963).
233 - Refactorings & faster rustfmt.
234
235 ## [0.2.6] 2017-09-14
236
237 ### Fixed
238
239 - Fix a performance issue with nested block (#1940).
240 - Refactorings & faster rustfmt.
241
242 ## [0.2.5] 2017-08-31
243
244 ### Added
245
246 - Format and preserve attributes on statements (#1933).
247
248 ### Fixed
249
250 - Use getters to access `Span` fields (#1899).
251
252 ## [0.2.4] 2017-08-30
253
254 ### Added
255
256 - Add support for `Yield` (#1928).
257
258 ## [0.2.3] 2017-08-30
259
260 ### Added
261
262 - `multiline_closure_forces_block` configuration option (#1898).
263 - `multiline_match_arm_forces_block` configuration option (#1898).
264 - `merge_derives` configuration option (#1910).
265 - `struct_remove_empty_braces` configuration option (#1930).
266 - Various refactorings.
267
268 ### Changed
269
270 - Put single-lined block comments on the same line with list-like structure's item (#1923).
271 - Preserve blank line between doc comment and attribute (#1925).
272 - Put the opening and the closing braces of enum and struct on the same line, even when `item_brace_style = "AlwaysNextLine"` (#1930).
273
274 ### Fixed
275
276 - Format attributes on `ast::ForeignItem` and take max width into account (#1916).
277 - Ignore empty lines when calculating the shortest indent width inside macro with braces (#1918).
278 - Handle tabs properly inside macro with braces (#1918).
279 - Fix a typo in `compute_budgets_for_args()` (#1924).
280 - Recover comment between keyword (`impl` and `trait`) and `{` which used to get removed (#1925).