]> git.lizzy.rs Git - rust.git/blobdiff - CHANGELOG.md
meta: bump rustfmt version to 1.4.23
[rust.git] / CHANGELOG.md
index 142597601c6864afeb7a95085658b7a583c12df7..1c07e15f4c87f5996d7ad0dbdcecc37178171e39 100644 (file)
@@ -2,9 +2,342 @@
 
 ## [Unreleased]
 
+## [1.4.22] 2020-10-30
+
+### Changed
+
+- Update `rustc-ap-*` crates to v686.0.0
+
+### Added
+- Initial support for formatting new ConstBlock syntax ([#4478](https://github.com/rust-lang/rustfmt/pull/4478))
+
+### Fixed
+- Handling of unclosed delimiter-only parsing errors in input files ([#4466](https://github.com/rust-lang/rustfmt/issues/4466))
+- Misc. minor parser bugs ([#4418](https://github.com/rust-lang/rustfmt/issues/4418) and [#4431](https://github.com/rust-lang/rustfmt/issues/4431))
+- Panic on nested tuple access ([#4355](https://github.com/rust-lang/rustfmt/issues/4355))
+- Unable to disable license template path via cli override ([#4487](https://github.com/rust-lang/rustfmt/issues/4487))
+- Preserve comments in empty statements [#4018](https://github.com/rust-lang/rustfmt/issues/4018))
+- Indentation on skipped code [#4398](https://github.com/rust-lang/rustfmt/issues/4398))
+
+
+## [1.4.22] 2020-10-04
+
+### Changed
+
+- Update `rustc-ap-*` crates to v679.0.0
+- Add config option to allow control of leading match arm pipes
+- Support `RUSTFMT` environment variable in `cargo fmt` to run specified `rustfmt` instance
+
+### Fixed
+
+- Fix preservation of type aliases within extern blocks
+
+
+## [1.4.9] 2019-10-07
+
+### Changed
+
+- Update `rustc-ap-*` crates to 606.0.0.
+
+### Fixed
+
+- Fix aligning comments of different group
+- Fix flattening imports with a single `self`.
+- Fix removing attributes on function parameters.
+- Fix removing `impl` keyword from opaque type. 
+
+## [1.4.8] 2019-09-08
+
+### Changed
+
+- Update `rustc-ap-*` crates to 583.0.0.
+
+## [1.4.7] 2019-09-06
+
+### Added
+
+- Add `--config` command line option.
+
+### Changed
+
+- Update `rustc-ap-*` crates to 581.0.0.
+- rustfmt now do not warn against trailing whitespaces inside macro calls.
+
+### Fixed
+
+- Fix `merge_imports` generating invalid code.
+- Fix removing discriminant values on enum variants.
+- Fix modules defined inside `cfg_if!` not being formatted.
+- Fix minor formatting issues.
+
+## [1.4.6] 2019-08-28
+
+### Added
+
+- Add `--message-format` command line option to `cargo-fmt`.
+- Add `-l,--files-with-diff` command line option to `rustfmt`.
+- Add `json` emit mode. 
+
+### Fixed
+
+- Fix removing attributes on struct pattern's fields.
+- Fix non-idempotent formatting of match arm.
+- Fix `merge_imports` generating invalid code.
+- Fix imports with `#![macro_use]` getting reordered with `reorder_imports`.
+- Fix calculation of line numbers in checkstyle output.
+- Fix poor formatting of complex fn type.
+
+## [1.4.5] 2019-08-13
+
+### Fixed
+
+- Fix generating invalid code when formatting an impl block with const generics inside a where clause.
+- Fix adding a trailing space after a `dyn` keyword which is used as a macro argument by itself.
+
+## [1.4.4] 2019-08-06
+
+### Fixed
+
+- Fix `cargo fmt` incorrectly formatting crates that is not part of the workspace or the path dependencies.
+- Fix removing a trailing comma from a tuple pattern.
+
+## [1.4.3] 2019-08-02
+
+### Changed
+
+- Update `rustc-ap-*` crates to 546.0.0.
+
+### Fixed
+
+- Fix an underscore pattern getting removed.
+
+## [1.4.2] 2019-07-31
+
+### Changed
+
+- Explicitly require the version of `rustfmt-config_proc_macro` to be 0.1.2 or later.
+
+## [1.4.1] 2019-07-30
+
+### Changed
+
+- Update `rustc-ap-*` crates to 542.0.0.
+
+## [1.4.0] 2019-07-29
+
+### Added
+
+- Add new attribute `rustfmt::skip::attributes` to prevent rustfmt 
+from formatting an attribute #3665
+
+### Changed
+
+- Update `rustc-ap-*` crates to 541.0.0.
+- Remove multiple semicolons.
+
+## [1.3.3] 2019-07-15
+
+### Added
+
+- Add `--manifest-path` support to `cargo fmt` (#3683).
+
+### Fixed
+
+- Fix `cargo fmt -- --help` printing nothing (#3620).
+- Fix inserting an extra comma (#3677).
+- Fix incorrect handling of CRLF with `file-lines` (#3684).
+- Fix `print-config=minimal` option (#3687).
+
+## [1.3.2] 2019-07-06
+
+### Fixed
+
+- Fix rustfmt crashing when `await!` macro call is used in a method chain.
+- Fix rustfmt not recognizing a package whose name differs from its directory's name.
+
+## [1.3.1] 2019-06-30
+
+### Added
+
+- Implement the `Display` trait on the types of `Config`.
+
+### Changed
+
+- `ignore` configuration option now only supports paths separated by `/`. Windows-style paths are not supported.
+- Running `cargo fmt` in a sub-directory of a project is now supported.
+
+### Fixed
+
+- Fix bugs that may cause rustfmt to crash.
+
+## [1.3.0] 2019-06-09
+
+### Added
+
+- Format modules defined inside `cfg_if` macro calls #3600
+
+### Changed
+
 - Change option `format_doc_comment` to `format_code_in_doc_comment`.
 - `use_small_heuristics` changed to be an enum and stabilised. Configuration
   options are now ready for 1.0.
+- Stabilise `fn_args_density` configuration option and rename it to `fn_args_layout` #3581
+- Update `rustc-ap-*` crates to 486.0.0
+- Ignore sub-modules when skip-children is used #3607
+- Removed bitrig support #3608
+
+### Fixed
+
+- `wrap_comments` should not imply `format_doc_comments` #3535
+- Incorrect handling of const generics #3555
+- Add the handling for `vec!` with paren inside macro #3576
+- Format trait aliases with where clauses #3586
+- Catch panics from the parser while rewriting macro calls #3589
+- Fix erasing inner attributes in struct #3593
+- Inline the attribute with its item even with the `macro_use` attribute or when `reorder_imports` is disabled #3598
+- Fix the bug add unwanted code to impl #3602
+
+## [1.2.2] 2019-04-24
+
+### Fixed
+
+- Fix processing of `ignore` paths #3522
+- Attempt to format attributes if only they exist #3523
+
+## [1.2.1] 2019-04-18
+
+### Added
+
+- Add `--print-config current` CLI option b473e65
+- Create GitHub [page](https://rust-lang.github.io/rustfmt/) for Configuration.md #3485
+
+### Fixed
+
+- Keep comment appearing between parameter's name and its type #3491
+- Do not delete semicolon after macro call with square brackets #3500
+- Fix `--version` CLI option #3506
+- Fix duplication of attributes on a match arm's body #3510
+- Avoid overflowing item with attributes #3511
+
+## [1.2.0] 2019-03-27
+
+### Added
+
+- Add new attribute `rustfmt::skip::macros` to prevent rustfmt from formatting a macro #3454
+
+### Changed
+
+- Discard error report in silent_emitter #3466
+
+### Fixed
+
+- Fix bad performance on deeply nested binary expressions #3467
+- Use BTreeMap to guarantee consistent ordering b4d4b57
+
+## [1.1.1] 2019-03-21
+
+### Fixed
+
+- Avoid panic on macro inside deeply nested block c9479de
+- Fix line numbering in missed spans and handle file_lines in edge cases cdd08da
+- Fix formatting of async blocks 1fa06ec
+- Avoid duplication on the presence of spaces between macro name and `!` #3464
+
+## [1.1.0] 2019-03-17
+
+### Added
+
+- 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
+- Support `const` generics f0c861b
+- Support path clarity module #3448
+
+### Changed
+
+- Align loop and while formatting 7d9a2ef
+- Support `EmitMode::ModifiedLines` with stdin input #3424
+- Update `rustc-ap-*` crates to 407.0.0
+- Remove trailing whitespaces in missing spans 2d5bc69
+
+### Fixed
+
+- Do not remove comment in the case of no arg 8e3ef3e
+- Fix `Ident of macro+ident gets duplicated` error 40ff078
+- Format the if expression at the end of the block in a single line 5f3dfe6
+
+## [1.0.3] 2019-02-14
+
+### Added
+
+- Point unstable options to tracking issues 412dcc7
+
+### Changed
+
+- Update `rustc-ap-*` crates to 373.0.0
+
+## [1.0.2] 2019-02-12
+
+### Added
+
+- 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
+- Allow specifying package with `-p` CLI option a8d2591
+- Support `rustfmt::skip` on imports #3289
+- Support global `rustfmt.toml` to be written in user config directory #3280
+- Format visibility on trait alias 96a3df3
+
+### Changed
+
+- Do not modify original source code inside macro call #3260
+- Recognize strings inside comments in order to avoid indenting them baa62c6
+- Use Unicode-standard char width to wrap comments or strings a01990c
+- Change new line point in the case of no args #3294
+- Use the same formatting rule between functions and macros #3298
+- 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
+
+### Fixed
+
+- rewrite_comment: fix block fallback when failing to rewrite an itemized block ab7f4e1
+- Catch possible tokenizer panics #3240
+- Fix macro indentation on Windows #3266
+- Fix shape when formatting return or break expr on statement position #3259
+- rewrite_comment: fix block fallback when failing to rewrite an itemized block
+- Keep leading double-colon to respect the 2018 edition of rust's paths a2bfc02
+- Fix glob and nested global imports 2125ad2
+- Do not force trailing comma when using mixed layout #3306
+- Prioritize `single_line_fn` and `empty_item_single_line` over `brace_style` #3308
+- Fix `internal error: left behind trailing whitespace` with long lines c2534f5
+- Fix attribute duplication #3325
+- Fix formatting of strings within a macro 813aa79
+- Handle a macro argument with a single keyword 9a7ea6a
+
+## [1.0.1] 2018-12-09
+
+### Added
+
+- Add a `version` option 378994b
+
+### Changed
+
+- End expressions like return/continue/break with a semicolon #3223
+- 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
+
+### Fixed
+
+- Allow to run a rustfmt command from cargo-fmt even when there is no target a2da636
+- Fix `un-closed delimiter` errors when formatting break labels 40174e9
+
+## [1.0.0] 2018-11-19
+
+### Changed
+
+- Preserve possibly one whitespace for brace macros 1a3bc79
+- Prefer to break arguments over putting output type on the next line 1dd54e6
+
+## [0.99.9] 2018-11-15
+
+### Changed
+
+- 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
+- Don't align comments on `extern crate`s dd7add7
 
 ## [0.99.8] 2018-11-14