]> git.lizzy.rs Git - rust.git/blob - CHANGELOG.md
changelog for 0.7.0
[rust.git] / CHANGELOG.md
1 # Changelog
2
3 ## [Unreleased]
4
5 - Change option `format_doc_comment` to `format_code_in_doc_comment`.
6 - `use_small_heuristics` changed to be an enum and stabilised. Configuration
7   options are now ready for 1.0.
8
9 ## [0.7.0] 2018-05-14
10
11 ### Added
12
13 - Add integration tests against crates in the rust-lang-nursery c79f39a
14
15 ### Changed
16
17 - Update rustc-ap-syntax to 128.0.0 and ustc-ap-rustc_target to 128.0.0 195395f
18 - Put operands on its own line when each fits in a single line f8439ce
19 - Improve CLI options 55ac062 1869888 798bffb 4d9de48 eca7796 8396da1 5d9f5aa
20
21 ### Fixed
22
23 - Use correct line width for list attribute 61a401a
24 - Avoid flip-flopping impl items when reordering them 37c216c
25 - Formatting breaks short lines when max_width is less than 100 9b36156
26 - Fix variant "Mixed" of imports_layout option 8c8676c
27 - Improve handling of long lines f885039
28 - Fix up lines exceeding max width 51c07f4
29 - Fix handling of modules in non_modrs_mods style cf573e8
30 - Do not duplicate attributes on use items e59ceaf
31 - Do not insert an extra brace in macros with native newlines 4c9ef93
32
33 ## [0.6.1] 2018-05-01
34
35 ### Changed
36
37 - Change the default value of imports_indent to IndentStyle::Block https://github.com/rust-lang/rustfmt/pull/2662
38
39 ### Fixed
40
41 - Handle formatting of auto traits 5b5a72c
42 - Use consistent formatting for empty enum and struct https://github.com/rust-lang/rustfmt/pull/2656
43
44 ## [0.6.0] 2018-04-20
45
46 ### Changed
47
48 - Improve public API 8669004
49
50 ## [0.5.0] 2018-04-20
51
52 ### Added
53
54 - Add `verbose-diff` CLI option 5194984
55
56 ### Changed
57
58 - Update rustc-ap-syntax to 103.0.0 dd807e2
59 - Refactor to make a sensible public API ca610d3
60
61 ### Fixed
62
63 - Add spaces between consecutive `..` `..=` 61d29eb
64
65 ## [0.4.2] 2018-04-12
66
67 ### Added
68
69 - Handle binary operators and lifetimes 0fd174d
70 - Add reorder_impl_items config option 94f5a05
71 - Add `--unstable-features` CLI option to list unstable options from the `--help` output 8208f8a
72 - Add merge_imports config option 5dd203e
73
74 ### Changed
75
76 - Format macro arguments with vertical layout ec71459
77 - Reorder imports by default 164cf7d
78 - Do not collapse block around expr with condition on match arm 5b9b7d5
79 - Use vertical layout for complex attributes c77708f
80 - Format array using heuristics for function calls 98c6f7b
81 - Implement stable ordering for impl items with the the following item priority: type, const, macro, then method fa80ddf
82 - Reorder imports by default 164cf7d
83 - Group `extern crate` by default 3a138a2
84 - Make `error_on_line_overflow` false by default f146711
85 - Merge imports with the same prefix into a single nested import 1954513
86 - Squash the various 'reorder imports' option into one 911395a
87
88 ### Fixed
89
90 - Print version is missing the channel ca6fc67
91 - Do not add the beginning vert to the match arm 1e1d9d4
92 - Follow indent style config when formatting attributes efd295a
93 - Do not insert newline when item is empty a8022f3
94 - Do not indent or unindent inside string literal ec1907b
95
96 ## [0.4.1] 2018-03-16
97
98 ### Added
99
100 - Add `ignore` configuration option.
101 - Add `license_template_path` configuration option.
102 - Format `lazy_static!`.
103
104 ### Fixed
105
106 - Fix formatting bugs.
107 - Fix setting `reorder_modules` removing inline modules.
108 - Format attributes on block expressions.
109 - Support `dyn trait` syntax.
110 - Support multiple patterns in `if let` and `while let`.
111 - Support a pattern with parentheses.
112
113 ## [0.4.0] 2018-03-02
114
115 ### Changed
116
117 - Do not print verbose outputs when formatting with stdin.
118 - Preserve trailing whitespaces in doc comments.
119 - Scale the values of width heuristics by `max_width`.
120
121 ### Fixed
122
123 - Do not reorder items with `#[macro_use]`.
124 - Fix formatting bugs.
125 - Support the beginning `|` on a match arm.
126
127 ## [0.3.8] 2018-02-04
128
129 ### Added
130
131 - Format (or at least try to format) `macro_rules!`.
132
133 ## [0.3.7] 2018-02-01
134
135 ### Added
136
137 - Add `use_field_init_shorthand` config option.
138 - Add `reorder_modules` configuration option.
139
140 ## [0.3.6] 2018-01-18
141
142 ### Fixed
143
144 - Fix panicking on formatting certain macros (#2371).
145
146 ## [0.3.5] 2018-01-15
147
148 ### Changed
149
150 - Format code block in comments when `wrap_comments` is set to `true`.
151 - Remove `same_line_attributes` configuration option.
152 - Rename `git-fmt` to `git-rustfmt`.
153
154 ### Fixed
155
156 - Rustup to `rustc 1.25.0-nightly (e6072a7b3 2018-01-13)`.
157 - Fix formatting bugs.
158
159 ## [0.3.4] 2017-12-23
160
161 ### Added
162
163 - Add `--version` flag to `cargo-fmt`, allow `cargo fmt --version`.
164
165 ### Fixed
166
167 - Rustup to `rustc 1.24.0-nightly (5165ee9e2 2017-12-22)`.
168
169 ## [0.3.3] 2017-12-22
170
171 ### Added
172
173 - Format trait aliases.
174
175 ### Changed
176
177 - `cargo fmt` will format every workspace member.
178
179 ### Fixed
180
181 - Rustup to `rustc 1.24.0-nightly (250b49205 2017-12-21)`
182 - Fix formatting bugs.
183
184 ## [0.3.2] 2017-12-15
185
186 ### Changed
187
188 - Warn when unknown configuration option is used.
189
190 ### Fixed
191
192 - Rustup to `rustc 1.24.0-nightly (0077d128d 2017-12-14)`.
193
194 ## [0.3.1] 2017-12-11
195
196 ### Added
197
198 - Add `error_on_unformatted` configuration option.
199 - Add `--error-on-unformatted` command line option.
200
201 ### Changed
202
203 - Do not report formatting errors on comments or strings by default.
204 - Rename `error_on_line_overflow_comments` to `error_on_unformatted`.
205
206 ### Fixed
207
208 - Fix formatting bugs.
209 - Fix adding a trailing whitespace inside code block when `wrap_comments = true`.
210
211 ## [0.3.0] 2017-12-11
212
213 ### Added
214
215 - Support nested imports.
216
217 ### Changed
218
219 - Do not report errors on skipped items.
220 - Do not format code block inside comments when `wrap_comments = true`.
221 - Keep vertical spaces between items within range.
222 - Format `format!` and its variants using compressed style.
223 - Format `write!` and its variants using compressed style.
224 - Format **simple** array using compressed style.
225
226 ### Fixed
227
228 - Fix `rustfmt --package package_name` not working properly.
229 - Fix formatting bugs.
230
231 ## [0.2.17] 2017-12-03
232
233 ### Added
234
235 - Add `blank_lines_lower_bound` and `blank_lines_upper_bound` configuration options.
236
237 ### Changed
238
239 - Combine configuration options related to width heuristic into `width_heuristic`.
240 - If the match arm's body is `if` expression, force to use block.
241
242 ### Fixed
243
244 - Fix `cargo fmt --all` being trapped in an infinite loop.
245 - Fix many formatting bugs.
246
247 ### Removed
248
249 - Remove legacy configuration options.
250
251 ## [0.2.16] 2017-11-21
252
253 ### Added
254
255 - Remove empty lines at the beginning of the file.
256 - Soft wrapping on doc comments.
257
258 ### Changed
259
260 - Break before `|` when using multiple lines for match arm patterns.
261 - Combine `control_style`, `where_style` and `*_indent` config options into `indent_style`.
262 - Combine `item_brace_style` and `fn_brace_style` config options into `brace_style`.
263 - Combine config options related spacing around colons into `space_before_colon` and `space_after_colon`.
264
265 ### Fixed
266
267 - Fix many bugs.
268
269 ## [0.2.15] 2017-11-08
270
271 ### Added
272
273 - Add git-fmt tool
274 - `where_single_line` configuration option.
275
276 ### Changed
277
278 - Rename `chain_one_line_max` to `chain_width`.
279 - Change the suffix of indent-related configuration options to `_indent`.
280
281 ## [0.2.14] 2017-11-06
282
283 ### Fixed
284
285 - Rustup to the latest nightly.
286
287 ## [0.2.13] 2017-10-30
288
289 ### Fixed
290
291 - Rustup to the latest nightly.
292
293 ## [0.2.12] 2017-10-29
294
295 ### Fixed
296
297 - Fix a bug that `cargo fmt` hangs forever.
298
299 ## [0.2.11] 2017-10-29
300
301 ### Fixed
302
303 - Fix a bug that `cargo fmt` crashes.
304
305 ## [0.2.10] 2017-10-28
306
307 ## [0.2.9] 2017-10-16
308
309 ## [0.2.8] 2017-09-28
310
311 ## [0.2.7] 2017-09-21
312
313 ### Added
314
315 - `binop_separator` configuration option (#1964).
316
317 ### Changed
318
319 - Use horizontal layout for function call with a single argument.
320
321 ### Fixed
322
323 - Fix panicking when calling `cargo fmt --all` (#1963).
324 - Refactorings & faster rustfmt.
325
326 ## [0.2.6] 2017-09-14
327
328 ### Fixed
329
330 - Fix a performance issue with nested block (#1940).
331 - Refactorings & faster rustfmt.
332
333 ## [0.2.5] 2017-08-31
334
335 ### Added
336
337 - Format and preserve attributes on statements (#1933).
338
339 ### Fixed
340
341 - Use getters to access `Span` fields (#1899).
342
343 ## [0.2.4] 2017-08-30
344
345 ### Added
346
347 - Add support for `Yield` (#1928).
348
349 ## [0.2.3] 2017-08-30
350
351 ### Added
352
353 - `multiline_closure_forces_block` configuration option (#1898).
354 - `multiline_match_arm_forces_block` configuration option (#1898).
355 - `merge_derives` configuration option (#1910).
356 - `struct_remove_empty_braces` configuration option (#1930).
357 - Various refactorings.
358
359 ### Changed
360
361 - Put single-lined block comments on the same line with list-like structure's item (#1923).
362 - Preserve blank line between doc comment and attribute (#1925).
363 - Put the opening and the closing braces of enum and struct on the same line, even when `item_brace_style = "AlwaysNextLine"` (#1930).
364
365 ### Fixed
366
367 - Format attributes on `ast::ForeignItem` and take max width into account (#1916).
368 - Ignore empty lines when calculating the shortest indent width inside macro with braces (#1918).
369 - Handle tabs properly inside macro with braces (#1918).
370 - Fix a typo in `compute_budgets_for_args()` (#1924).
371 - Recover comment between keyword (`impl` and `trait`) and `{` which used to get removed (#1925).