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