X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=CHANGELOG.md;h=416203b823a529fe85ba33b683675474c25344db;hb=48f6c32ec1dd370f3157a27b48a000fd8c1185af;hp=2f8e153861a6ea82c2af451c8056947040988ca7;hpb=ca18c45d99097555847f451549c71e347fea474f;p=rust.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f8e153861a..416203b823a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,324 @@ ## [Unreleased] +## [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 + +### Added + +- Add `overflow_delimited_expr` config option to more aggressively allow overflow #3175 + +### Fixed + +- Fix the logic for retaining a comment before the arrow in a match #3181 +- Do not wrap comments in doctest to avoid failing doctest runs #3183 +- Fix comment rewriting that was wrapping code into a line comment #3188 +- Fix formatting of unit-struct with `where`-clause #3200 ## [0.99.7] 2018-11-07