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