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