]> git.lizzy.rs Git - rust.git/blob - CHANGELOG.md
meta: bump rustfmt version to 1.4.23
[rust.git] / CHANGELOG.md
1 # Changelog
2
3 ## [Unreleased]
4
5 ## [1.4.22] 2020-10-30
6
7 ### Changed
8
9 - Update `rustc-ap-*` crates to v686.0.0
10
11 ### Added
12 - Initial support for formatting new ConstBlock syntax ([#4478](https://github.com/rust-lang/rustfmt/pull/4478))
13
14 ### Fixed
15 - Handling of unclosed delimiter-only parsing errors in input files ([#4466](https://github.com/rust-lang/rustfmt/issues/4466))
16 - Misc. minor parser bugs ([#4418](https://github.com/rust-lang/rustfmt/issues/4418) and [#4431](https://github.com/rust-lang/rustfmt/issues/4431))
17 - Panic on nested tuple access ([#4355](https://github.com/rust-lang/rustfmt/issues/4355))
18 - Unable to disable license template path via cli override ([#4487](https://github.com/rust-lang/rustfmt/issues/4487))
19 - Preserve comments in empty statements [#4018](https://github.com/rust-lang/rustfmt/issues/4018))
20 - Indentation on skipped code [#4398](https://github.com/rust-lang/rustfmt/issues/4398))
21
22
23 ## [1.4.22] 2020-10-04
24
25 ### Changed
26
27 - Update `rustc-ap-*` crates to v679.0.0
28 - Add config option to allow control of leading match arm pipes
29 - Support `RUSTFMT` environment variable in `cargo fmt` to run specified `rustfmt` instance
30
31 ### Fixed
32
33 - Fix preservation of type aliases within extern blocks
34
35
36 ## [1.4.9] 2019-10-07
37
38 ### Changed
39
40 - Update `rustc-ap-*` crates to 606.0.0.
41
42 ### Fixed
43
44 - Fix aligning comments of different group
45 - Fix flattening imports with a single `self`.
46 - Fix removing attributes on function parameters.
47 - Fix removing `impl` keyword from opaque type. 
48
49 ## [1.4.8] 2019-09-08
50
51 ### Changed
52
53 - Update `rustc-ap-*` crates to 583.0.0.
54
55 ## [1.4.7] 2019-09-06
56
57 ### Added
58
59 - Add `--config` command line option.
60
61 ### Changed
62
63 - Update `rustc-ap-*` crates to 581.0.0.
64 - rustfmt now do not warn against trailing whitespaces inside macro calls.
65
66 ### Fixed
67
68 - Fix `merge_imports` generating invalid code.
69 - Fix removing discriminant values on enum variants.
70 - Fix modules defined inside `cfg_if!` not being formatted.
71 - Fix minor formatting issues.
72
73 ## [1.4.6] 2019-08-28
74
75 ### Added
76
77 - Add `--message-format` command line option to `cargo-fmt`.
78 - Add `-l,--files-with-diff` command line option to `rustfmt`.
79 - Add `json` emit mode. 
80
81 ### Fixed
82
83 - Fix removing attributes on struct pattern's fields.
84 - Fix non-idempotent formatting of match arm.
85 - Fix `merge_imports` generating invalid code.
86 - Fix imports with `#![macro_use]` getting reordered with `reorder_imports`.
87 - Fix calculation of line numbers in checkstyle output.
88 - Fix poor formatting of complex fn type.
89
90 ## [1.4.5] 2019-08-13
91
92 ### Fixed
93
94 - Fix generating invalid code when formatting an impl block with const generics inside a where clause.
95 - Fix adding a trailing space after a `dyn` keyword which is used as a macro argument by itself.
96
97 ## [1.4.4] 2019-08-06
98
99 ### Fixed
100
101 - Fix `cargo fmt` incorrectly formatting crates that is not part of the workspace or the path dependencies.
102 - Fix removing a trailing comma from a tuple pattern.
103
104 ## [1.4.3] 2019-08-02
105
106 ### Changed
107
108 - Update `rustc-ap-*` crates to 546.0.0.
109
110 ### Fixed
111
112 - Fix an underscore pattern getting removed.
113
114 ## [1.4.2] 2019-07-31
115
116 ### Changed
117
118 - Explicitly require the version of `rustfmt-config_proc_macro` to be 0.1.2 or later.
119
120 ## [1.4.1] 2019-07-30
121
122 ### Changed
123
124 - Update `rustc-ap-*` crates to 542.0.0.
125
126 ## [1.4.0] 2019-07-29
127
128 ### Added
129
130 - Add new attribute `rustfmt::skip::attributes` to prevent rustfmt 
131 from formatting an attribute #3665
132
133 ### Changed
134
135 - Update `rustc-ap-*` crates to 541.0.0.
136 - Remove multiple semicolons.
137
138 ## [1.3.3] 2019-07-15
139
140 ### Added
141
142 - Add `--manifest-path` support to `cargo fmt` (#3683).
143
144 ### Fixed
145
146 - Fix `cargo fmt -- --help` printing nothing (#3620).
147 - Fix inserting an extra comma (#3677).
148 - Fix incorrect handling of CRLF with `file-lines` (#3684).
149 - Fix `print-config=minimal` option (#3687).
150
151 ## [1.3.2] 2019-07-06
152
153 ### Fixed
154
155 - Fix rustfmt crashing when `await!` macro call is used in a method chain.
156 - Fix rustfmt not recognizing a package whose name differs from its directory's name.
157
158 ## [1.3.1] 2019-06-30
159
160 ### Added
161
162 - Implement the `Display` trait on the types of `Config`.
163
164 ### Changed
165
166 - `ignore` configuration option now only supports paths separated by `/`. Windows-style paths are not supported.
167 - Running `cargo fmt` in a sub-directory of a project is now supported.
168
169 ### Fixed
170
171 - Fix bugs that may cause rustfmt to crash.
172
173 ## [1.3.0] 2019-06-09
174
175 ### Added
176
177 - Format modules defined inside `cfg_if` macro calls #3600
178
179 ### Changed
180
181 - Change option `format_doc_comment` to `format_code_in_doc_comment`.
182 - `use_small_heuristics` changed to be an enum and stabilised. Configuration
183   options are now ready for 1.0.
184 - Stabilise `fn_args_density` configuration option and rename it to `fn_args_layout` #3581
185 - Update `rustc-ap-*` crates to 486.0.0
186 - Ignore sub-modules when skip-children is used #3607
187 - Removed bitrig support #3608
188
189 ### Fixed
190
191 - `wrap_comments` should not imply `format_doc_comments` #3535
192 - Incorrect handling of const generics #3555
193 - Add the handling for `vec!` with paren inside macro #3576
194 - Format trait aliases with where clauses #3586
195 - Catch panics from the parser while rewriting macro calls #3589
196 - Fix erasing inner attributes in struct #3593
197 - Inline the attribute with its item even with the `macro_use` attribute or when `reorder_imports` is disabled #3598
198 - Fix the bug add unwanted code to impl #3602
199
200 ## [1.2.2] 2019-04-24
201
202 ### Fixed
203
204 - Fix processing of `ignore` paths #3522
205 - Attempt to format attributes if only they exist #3523
206
207 ## [1.2.1] 2019-04-18
208
209 ### Added
210
211 - Add `--print-config current` CLI option b473e65
212 - Create GitHub [page](https://rust-lang.github.io/rustfmt/) for Configuration.md #3485
213
214 ### Fixed
215
216 - Keep comment appearing between parameter's name and its type #3491
217 - Do not delete semicolon after macro call with square brackets #3500
218 - Fix `--version` CLI option #3506
219 - Fix duplication of attributes on a match arm's body #3510
220 - Avoid overflowing item with attributes #3511
221
222 ## [1.2.0] 2019-03-27
223
224 ### Added
225
226 - Add new attribute `rustfmt::skip::macros` to prevent rustfmt from formatting a macro #3454
227
228 ### Changed
229
230 - Discard error report in silent_emitter #3466
231
232 ### Fixed
233
234 - Fix bad performance on deeply nested binary expressions #3467
235 - Use BTreeMap to guarantee consistent ordering b4d4b57
236
237 ## [1.1.1] 2019-03-21
238
239 ### Fixed
240
241 - Avoid panic on macro inside deeply nested block c9479de
242 - Fix line numbering in missed spans and handle file_lines in edge cases cdd08da
243 - Fix formatting of async blocks 1fa06ec
244 - Avoid duplication on the presence of spaces between macro name and `!` #3464
245
246 ## [1.1.0] 2019-03-17
247
248 ### Added
249
250 - Add `inline_attribute_width` configuration option to write an item and its attribute on the same line if their combined width is below a threshold #3409
251 - Support `const` generics f0c861b
252 - Support path clarity module #3448
253
254 ### Changed
255
256 - Align loop and while formatting 7d9a2ef
257 - Support `EmitMode::ModifiedLines` with stdin input #3424
258 - Update `rustc-ap-*` crates to 407.0.0
259 - Remove trailing whitespaces in missing spans 2d5bc69
260
261 ### Fixed
262
263 - Do not remove comment in the case of no arg 8e3ef3e
264 - Fix `Ident of macro+ident gets duplicated` error 40ff078
265 - Format the if expression at the end of the block in a single line 5f3dfe6
266
267 ## [1.0.3] 2019-02-14
268
269 ### Added
270
271 - Point unstable options to tracking issues 412dcc7
272
273 ### Changed
274
275 - Update `rustc-ap-*` crates to 373.0.0
276
277 ## [1.0.2] 2019-02-12
278
279 ### Added
280
281 - Add a [section](https://github.com/rust-lang/rustfmt/blob/ae331be/Contributing.md#version-gate-formatting-changes) to the Contributing.md file about version-gating formatting changes 36e2cb0
282 - Allow specifying package with `-p` CLI option a8d2591
283 - Support `rustfmt::skip` on imports #3289
284 - Support global `rustfmt.toml` to be written in user config directory #3280
285 - Format visibility on trait alias 96a3df3
286
287 ### Changed
288
289 - Do not modify original source code inside macro call #3260
290 - Recognize strings inside comments in order to avoid indenting them baa62c6
291 - Use Unicode-standard char width to wrap comments or strings a01990c
292 - Change new line point in the case of no args #3294
293 - Use the same formatting rule between functions and macros #3298
294 - Update rustc-ap-rustc_target to 366.0.0, rustc-ap-syntax to 366.0.0, and rustc-ap-syntax_pos to 366.0.0
295
296 ### Fixed
297
298 - rewrite_comment: fix block fallback when failing to rewrite an itemized block ab7f4e1
299 - Catch possible tokenizer panics #3240
300 - Fix macro indentation on Windows #3266
301 - Fix shape when formatting return or break expr on statement position #3259
302 - rewrite_comment: fix block fallback when failing to rewrite an itemized block
303 - Keep leading double-colon to respect the 2018 edition of rust's paths a2bfc02
304 - Fix glob and nested global imports 2125ad2
305 - Do not force trailing comma when using mixed layout #3306
306 - Prioritize `single_line_fn` and `empty_item_single_line` over `brace_style` #3308
307 - Fix `internal error: left behind trailing whitespace` with long lines c2534f5
308 - Fix attribute duplication #3325
309 - Fix formatting of strings within a macro 813aa79
310 - Handle a macro argument with a single keyword 9a7ea6a
311
312 ## [1.0.1] 2018-12-09
313
314 ### Added
315
316 - Add a `version` option 378994b
317
318 ### Changed
319
320 - End expressions like return/continue/break with a semicolon #3223
321 - Update rustc-ap-rustc_target to 306.0.0, rustc-ap-syntax to 306.0.0, and rustc-ap-syntax_pos to 306.0.0
322
323 ### Fixed
324
325 - Allow to run a rustfmt command from cargo-fmt even when there is no target a2da636
326 - Fix `un-closed delimiter` errors when formatting break labels 40174e9
327
328 ## [1.0.0] 2018-11-19
329
330 ### Changed
331
332 - Preserve possibly one whitespace for brace macros 1a3bc79
333 - Prefer to break arguments over putting output type on the next line 1dd54e6
334
335 ## [0.99.9] 2018-11-15
336
337 ### Changed
338
339 - Update rustc-ap-rustc_target to 297.0.0, rustc-ap-syntax to 297.0.0, to rustc-ap-syntax_pos to 297.0.0
340 - Don't align comments on `extern crate`s dd7add7
341
342 ## [0.99.8] 2018-11-14
343
344 ### Added
345
346 - Add `overflow_delimited_expr` config option to more aggressively allow overflow #3175
347
348 ### Fixed
349
350 - Fix the logic for retaining a comment before the arrow in a match #3181
351 - Do not wrap comments in doctest to avoid failing doctest runs #3183
352 - Fix comment rewriting that was wrapping code into a line comment #3188
353 - Fix formatting of unit-struct with `where`-clause #3200
354
355 ## [0.99.7] 2018-11-07
356
357 ### Changed
358
359 - Force a newline after the `if` condition if there is a different indentation level #3109
360 - Use correct width when formatting type on local statement #3126
361 - Treat crates non-alphabetically when ordering 799005f
362 - Fix formatting of code that is annotated with rustfmt::skip #3113
363 - Stabilize `edition` configuration option 9c3ae2d
364 - cargo-fmt: detect Rust edition in use #3129
365 - Trim the indentation on macros which heuristically appear to use block-style indentation #3178
366
367 ### Fixed
368
369 - Do not remove path disambiugator inside macro #3142
370 - Improve handling of Windows newlines #3141
371 - Fix alignment of a struct's fields (`struct_field_align_threshold` option) with the Visual `indent_style` #3165
372 - Fix a bug in formatting markdown lists within comments #3172
373
374 ## [0.99.6] 2018-10-18
375
376 ### Added
377
378 - Add `enum_discrim_align_threshold` option to vertically align enum discriminants cc22869
379 - Add `println!`-like heuristic to the `fail` attribute #3067
380 - Handle itemized items inside comments #3083
381 - Add `format_doc_comments` configuration option to control the formatting of code snippets inside comments #3089
382
383 ### Changed
384
385 - Makes brace behavior consistent with empty bodies for traits and impls 2727d41
386 - Consider a multi-lined array as a block-like expression #3969
387 - Improve formatting of strings #3073
388 - Get rid of extra commas in Visual struct literal formatting #3077
389 - Update rustc-ap-rustc_target to 274.0.0, rustc-ap-syntax to 274.0.0, and rustc-ap-syntax_pos to 274.0.0
390 - Format macro calls with item-like arguments #3080
391 - Avoid control flow expressions conditions to go multi line ef59b34
392 - Simplify multi-lining binop expressions #3101
393
394 ### Fixed
395
396 - Do not format a code block in documentation if it is annotated with ignore or text 2bcc3a9
397 - Fix inconsistent overflow behavior in Visual style #3078
398 - Fix corner cases of the string formatting implementation #3083
399 - Do not add parens around lifetimes 0ac68c9
400 - Catch parser panic in format_snippet 8c4e92a
401
402 ## [0.99.5] 2018-09-25
403
404 ### Added
405
406 - Handle leading module separator for 2018 Edition #2952
407 - Add configuration option `normalize_doc_attributes`: convert doc attributes to comments #3002
408
409 ### Changed
410
411 - Accept 2015 and 2018 instead of Edition2015 and Edition2018 for edition option eec7436
412 - Support platforms without a timer 46e2a2e
413 - Update rustc-ap-rustc_target to 263.0.0, rustc-ap-syntax to 263.0.0, and rustc-ap-syntax_pos to 263.0.0
414
415 ### Fixed
416
417 - Format of attributes with commas #2971
418 - Fix optional arg condensing #2972
419 - Improve formatting of long function parameters #2981
420 - Fix formatting of raw string literals #2983
421 - Handle chain with try operators with spaces #2986
422 - Use correct shape in Visual tuple rewriting #2987
423 - Impove formatting of arguments with `visual_style = "Visual"` option #2988
424 - Change `print_diff` to output the correct line number 992b179
425 - Propagate errors about failing to rewrite a macro 6f318e3
426 - Handle formatting of long function signature #3010
427 - Fix indent computation of a macro with braces c3edf6d
428 - Format generics on associated types #3035
429 - Incorrect indentation of multiline block match expression #3042
430 - Fix bug in import where two consecutive module separators were possible 98a0ef2
431 - Prevent right-shifting of block comments with bare lines 5fdb6db
432
433 ## [0.99.4] 2018-08-27
434
435 ### Added
436
437 - Handle formatting of underscore imports #2951
438 - Handle formatting of try blocks #2965
439
440 ### Changed
441
442 - Update rustc-ap-rustc_target to 237.0.0, rustc-ap-syntax to 237.0.0, and rustc-ap-syntax_pos to 237.0.0 ca19c9a
443 - Consider `dev` channel as nightly for unstable features #2948
444
445 ### Fixed
446
447 - Fix formatting of patterns with ellipsis # 2942
448
449 ## [0.99.3] 2018-08-23
450
451 ### Added
452
453 - Use path attribute when searching for modules #2901
454 - Expose FileLines JSON representation to allow external libraries to use the file_lines option #2915
455
456 ### Changed
457
458 - Replace '--conifig-help' with '--config=help' cb10e06
459 - Improve formatting of slice patterns #2912
460
461 ### Fixed
462
463 - Format chains with comment #2899
464 - Fix indentation of formatted macro body #2920
465 - Fix indentation of block comments f23e6aa
466
467 ## [0.99.2] 2018-08-07
468
469 ### Changed
470
471 - Update rustc-ap-rustc_target to 218.0.0, rustc-ap-syntax to 218.0.0, and rustc-ap-syntax_pos to 218.0.0 5c9a2b6
472 - Combine function-like attributes #2900
473
474 ### Fixed
475
476 - Explicitly handle semicolon after the item in statement position d96e3ca
477 - Fix parsing '#'-hiding of rustdoc 2eca09e
478
479 ## [0.99.1] 2018-08-04
480
481 ### Fixed
482
483 - fix use statements ordering when a number is present 1928ae7
484
485 ## [0.99.0] 2018-08-03
486
487 - 1.0 RC release
488
489 ### Changed
490
491 - Clarification in README.md 30fe66b
492
493 ## [0.9.0] 2018-08-01
494
495 ### Added
496
497 - Handle raw identifiers 3027c21
498 - Format async closure 60ce411
499 - Add max_width option for all heuristics c2ae39e
500 - Add config option `format_macro_matchers` to format the metavariable matching patterns in macros 79c5ee8
501 - Add config option `format_macro_bodies` to format the bodies of macros 79c5ee8
502 - Format exitential type fc307ff
503 - Support raw identifiers in struct expressions f121b1a
504 - Format Async block and async function 0b25f60
505
506 ### Changed
507
508 - Update rustc-ap-rustc_target to 211.0.0, rustc-ap-syntax to 211.0.0, and rustc-ap-syntax_pos to 211.0.0
509 - Put each nested import on its own line while putting non-nested imports on the same line as much as possible 42ab258
510 - Respect `empty_item_single_line` config option when formatting empty impls. Put the `where` on its own line to improve readability #2771
511 - Strip leading `|` in match arm patterns 1d4b988
512 - Apply short function call heuristic to attributes 3abebf9
513 - Indent a match guard if the pattern is multiline be4d37d
514 - Change default newline style to `Native` 9d8f381
515 - Improve formatting of series of binop expressions a4cdb68
516 - Trigger an internal error if we skip formatting due to a lost comment b085113
517 - Refactor chain formatting #2838
518
519 ### Fixed
520
521 - Do not insert spaces around braces with empty body or multiple lines 2f65852
522 - Allow using mixed layout with comments #2766
523 - Handle break labels #2726
524 - fix rewrite_string when a line feed is present 472a2ed
525 - Fix an anomaly with comments and array literals b28a0cd
526 - Check for comments after the `=>` in a match arm 6899471
527
528 ## [0.8.0,0.8.1,0.8.2] 2018-05-28
529
530 ### Added
531
532 - Use scoped attributes for skip attribute https://github.com/rust-lang/rustfmt/pull/2703
533
534 ### Changed
535
536 - Comment options `wrap_comments` and `normalize_comments` are reverted back to unstable 416bc4c
537 - Stabilise `reorder_imports` and `reorder_modules` options 7b6d2b4
538 - Remove `spaces_within_parens_and_brackets` option d726492
539 - Stabilise shorthand options: `use_try_shorthand`, `use_field_init_shorthand`, and `force_explicit_abi` 8afe367
540 - Stabilise `remove_nested_parens` and set default to true a70f716
541 - Unstabilise `unstable_features` dd9c15a
542 - Remove `remove_blank_lines_at_start_or_end_of_block` option 2ee8b0e
543 - Update rustc-ap-syntax to 146.0.0 and rustc-ap-rustc_target to 146.0.0 2c275a2
544 - Audit the public API #2639
545
546 ### Fixed
547
548 - Handle code block in doc comment without rust prefix f1974e2
549
550 ## [0.7.0] 2018-05-14
551
552 ### Added
553
554 - Add integration tests against crates in the rust-lang-nursery c79f39a
555
556 ### Changed
557
558 - Update rustc-ap-syntax to 128.0.0 and ustc-ap-rustc_target to 128.0.0 195395f
559 - Put operands on its own line when each fits in a single line f8439ce
560 - Improve CLI options 55ac062 1869888 798bffb 4d9de48 eca7796 8396da1 5d9f5aa
561
562 ### Fixed
563
564 - Use correct line width for list attribute 61a401a
565 - Avoid flip-flopping impl items when reordering them 37c216c
566 - Formatting breaks short lines when max_width is less than 100 9b36156
567 - Fix variant "Mixed" of imports_layout option 8c8676c
568 - Improve handling of long lines f885039
569 - Fix up lines exceeding max width 51c07f4
570 - Fix handling of modules in non_modrs_mods style cf573e8
571 - Do not duplicate attributes on use items e59ceaf
572 - Do not insert an extra brace in macros with native newlines 4c9ef93
573
574 ## [0.6.1] 2018-05-01
575
576 ### Changed
577
578 - Change the default value of imports_indent to IndentStyle::Block https://github.com/rust-lang/rustfmt/pull/2662
579
580 ### Fixed
581
582 - Handle formatting of auto traits 5b5a72c
583 - Use consistent formatting for empty enum and struct https://github.com/rust-lang/rustfmt/pull/2656
584
585 ## [0.6.0] 2018-04-20
586
587 ### Changed
588
589 - Improve public API 8669004
590
591 ## [0.5.0] 2018-04-20
592
593 ### Added
594
595 - Add `verbose-diff` CLI option 5194984
596
597 ### Changed
598
599 - Update rustc-ap-syntax to 103.0.0 dd807e2
600 - Refactor to make a sensible public API ca610d3
601
602 ### Fixed
603
604 - Add spaces between consecutive `..` `..=` 61d29eb
605
606 ## [0.4.2] 2018-04-12
607
608 ### Added
609
610 - Handle binary operators and lifetimes 0fd174d
611 - Add reorder_impl_items config option 94f5a05
612 - Add `--unstable-features` CLI option to list unstable options from the `--help` output 8208f8a
613 - Add merge_imports config option 5dd203e
614
615 ### Changed
616
617 - Format macro arguments with vertical layout ec71459
618 - Reorder imports by default 164cf7d
619 - Do not collapse block around expr with condition on match arm 5b9b7d5
620 - Use vertical layout for complex attributes c77708f
621 - Format array using heuristics for function calls 98c6f7b
622 - Implement stable ordering for impl items with the the following item priority: type, const, macro, then method fa80ddf
623 - Reorder imports by default 164cf7d
624 - Group `extern crate` by default 3a138a2
625 - Make `error_on_line_overflow` false by default f146711
626 - Merge imports with the same prefix into a single nested import 1954513
627 - Squash the various 'reorder imports' option into one 911395a
628
629 ### Fixed
630
631 - Print version is missing the channel ca6fc67
632 - Do not add the beginning vert to the match arm 1e1d9d4
633 - Follow indent style config when formatting attributes efd295a
634 - Do not insert newline when item is empty a8022f3
635 - Do not indent or unindent inside string literal ec1907b
636
637 ## [0.4.1] 2018-03-16
638
639 ### Added
640
641 - Add `ignore` configuration option.
642 - Add `license_template_path` configuration option.
643 - Format `lazy_static!`.
644
645 ### Fixed
646
647 - Fix formatting bugs.
648 - Fix setting `reorder_modules` removing inline modules.
649 - Format attributes on block expressions.
650 - Support `dyn trait` syntax.
651 - Support multiple patterns in `if let` and `while let`.
652 - Support a pattern with parentheses.
653
654 ## [0.4.0] 2018-03-02
655
656 ### Changed
657
658 - Do not print verbose outputs when formatting with stdin.
659 - Preserve trailing whitespaces in doc comments.
660 - Scale the values of width heuristics by `max_width`.
661
662 ### Fixed
663
664 - Do not reorder items with `#[macro_use]`.
665 - Fix formatting bugs.
666 - Support the beginning `|` on a match arm.
667
668 ## [0.3.8] 2018-02-04
669
670 ### Added
671
672 - Format (or at least try to format) `macro_rules!`.
673
674 ## [0.3.7] 2018-02-01
675
676 ### Added
677
678 - Add `use_field_init_shorthand` config option.
679 - Add `reorder_modules` configuration option.
680
681 ## [0.3.6] 2018-01-18
682
683 ### Fixed
684
685 - Fix panicking on formatting certain macros (#2371).
686
687 ## [0.3.5] 2018-01-15
688
689 ### Changed
690
691 - Format code block in comments when `wrap_comments` is set to `true`.
692 - Remove `same_line_attributes` configuration option.
693 - Rename `git-fmt` to `git-rustfmt`.
694
695 ### Fixed
696
697 - Rustup to `rustc 1.25.0-nightly (e6072a7b3 2018-01-13)`.
698 - Fix formatting bugs.
699
700 ## [0.3.4] 2017-12-23
701
702 ### Added
703
704 - Add `--version` flag to `cargo-fmt`, allow `cargo fmt --version`.
705
706 ### Fixed
707
708 - Rustup to `rustc 1.24.0-nightly (5165ee9e2 2017-12-22)`.
709
710 ## [0.3.3] 2017-12-22
711
712 ### Added
713
714 - Format trait aliases.
715
716 ### Changed
717
718 - `cargo fmt` will format every workspace member.
719
720 ### Fixed
721
722 - Rustup to `rustc 1.24.0-nightly (250b49205 2017-12-21)`
723 - Fix formatting bugs.
724
725 ## [0.3.2] 2017-12-15
726
727 ### Changed
728
729 - Warn when unknown configuration option is used.
730
731 ### Fixed
732
733 - Rustup to `rustc 1.24.0-nightly (0077d128d 2017-12-14)`.
734
735 ## [0.3.1] 2017-12-11
736
737 ### Added
738
739 - Add `error_on_unformatted` configuration option.
740 - Add `--error-on-unformatted` command line option.
741
742 ### Changed
743
744 - Do not report formatting errors on comments or strings by default.
745 - Rename `error_on_line_overflow_comments` to `error_on_unformatted`.
746
747 ### Fixed
748
749 - Fix formatting bugs.
750 - Fix adding a trailing whitespace inside code block when `wrap_comments = true`.
751
752 ## [0.3.0] 2017-12-11
753
754 ### Added
755
756 - Support nested imports.
757
758 ### Changed
759
760 - Do not report errors on skipped items.
761 - Do not format code block inside comments when `wrap_comments = true`.
762 - Keep vertical spaces between items within range.
763 - Format `format!` and its variants using compressed style.
764 - Format `write!` and its variants using compressed style.
765 - Format **simple** array using compressed style.
766
767 ### Fixed
768
769 - Fix `rustfmt --package package_name` not working properly.
770 - Fix formatting bugs.
771
772 ## [0.2.17] 2017-12-03
773
774 ### Added
775
776 - Add `blank_lines_lower_bound` and `blank_lines_upper_bound` configuration options.
777
778 ### Changed
779
780 - Combine configuration options related to width heuristic into `width_heuristic`.
781 - If the match arm's body is `if` expression, force to use block.
782
783 ### Fixed
784
785 - Fix `cargo fmt --all` being trapped in an infinite loop.
786 - Fix many formatting bugs.
787
788 ### Removed
789
790 - Remove legacy configuration options.
791
792 ## [0.2.16] 2017-11-21
793
794 ### Added
795
796 - Remove empty lines at the beginning of the file.
797 - Soft wrapping on doc comments.
798
799 ### Changed
800
801 - Break before `|` when using multiple lines for match arm patterns.
802 - Combine `control_style`, `where_style` and `*_indent` config options into `indent_style`.
803 - Combine `item_brace_style` and `fn_brace_style` config options into `brace_style`.
804 - Combine config options related spacing around colons into `space_before_colon` and `space_after_colon`.
805
806 ### Fixed
807
808 - Fix many bugs.
809
810 ## [0.2.15] 2017-11-08
811
812 ### Added
813
814 - Add git-fmt tool
815 - `where_single_line` configuration option.
816
817 ### Changed
818
819 - Rename `chain_one_line_max` to `chain_width`.
820 - Change the suffix of indent-related configuration options to `_indent`.
821
822 ## [0.2.14] 2017-11-06
823
824 ### Fixed
825
826 - Rustup to the latest nightly.
827
828 ## [0.2.13] 2017-10-30
829
830 ### Fixed
831
832 - Rustup to the latest nightly.
833
834 ## [0.2.12] 2017-10-29
835
836 ### Fixed
837
838 - Fix a bug that `cargo fmt` hangs forever.
839
840 ## [0.2.11] 2017-10-29
841
842 ### Fixed
843
844 - Fix a bug that `cargo fmt` crashes.
845
846 ## [0.2.10] 2017-10-28
847
848 ## [0.2.9] 2017-10-16
849
850 ## [0.2.8] 2017-09-28
851
852 ## [0.2.7] 2017-09-21
853
854 ### Added
855
856 - `binop_separator` configuration option (#1964).
857
858 ### Changed
859
860 - Use horizontal layout for function call with a single argument.
861
862 ### Fixed
863
864 - Fix panicking when calling `cargo fmt --all` (#1963).
865 - Refactorings & faster rustfmt.
866
867 ## [0.2.6] 2017-09-14
868
869 ### Fixed
870
871 - Fix a performance issue with nested block (#1940).
872 - Refactorings & faster rustfmt.
873
874 ## [0.2.5] 2017-08-31
875
876 ### Added
877
878 - Format and preserve attributes on statements (#1933).
879
880 ### Fixed
881
882 - Use getters to access `Span` fields (#1899).
883
884 ## [0.2.4] 2017-08-30
885
886 ### Added
887
888 - Add support for `Yield` (#1928).
889
890 ## [0.2.3] 2017-08-30
891
892 ### Added
893
894 - `multiline_closure_forces_block` configuration option (#1898).
895 - `multiline_match_arm_forces_block` configuration option (#1898).
896 - `merge_derives` configuration option (#1910).
897 - `struct_remove_empty_braces` configuration option (#1930).
898 - Various refactorings.
899
900 ### Changed
901
902 - Put single-lined block comments on the same line with list-like structure's item (#1923).
903 - Preserve blank line between doc comment and attribute (#1925).
904 - Put the opening and the closing braces of enum and struct on the same line, even when `item_brace_style = "AlwaysNextLine"` (#1930).
905
906 ### Fixed
907
908 - Format attributes on `ast::ForeignItem` and take max width into account (#1916).
909 - Ignore empty lines when calculating the shortest indent width inside macro with braces (#1918).
910 - Handle tabs properly inside macro with braces (#1918).
911 - Fix a typo in `compute_budgets_for_args()` (#1924).
912 - Recover comment between keyword (`impl` and `trait`) and `{` which used to get removed (#1925).