Skip to content

Commit 08384b8

Browse files
Merge commit '3f7c366fc0464e01ddcaefbd70647cb3da4202be' into rustfmt-sync
2 parents 14803bd + 3f7c366 commit 08384b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1622
-366
lines changed

src/tools/rustfmt/.editorconfig

-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,3 @@ indent_size = unset
2121
indent_style = unset
2222
trim_trailing_whitespace = unset
2323
insert_final_newline = unset
24-
25-
[appveyor.yml]
26-
end_of_line = unset

src/tools/rustfmt/.github/workflows/upload-assets.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ jobs:
4646
shell: bash
4747

4848
- name: Build release binaries
49-
uses: actions-rs/cargo@v1
50-
with:
51-
command: build
52-
args: --release
49+
run: cargo build --release
5350

5451
- name: Build archive
5552
shell: bash

src/tools/rustfmt/.travis.yml

-77
This file was deleted.

src/tools/rustfmt/CHANGELOG.md

+43
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,47 @@
22

33
## [Unreleased]
44

5+
## [1.5.3] 2023-06-20
6+
7+
### Fixed
8+
9+
- When formatting doc comments with `wrap_comments = true` rustfmt will no longer wrap markdown tables [#4210](https://github.com/rust-lang/rustfmt/issues/4210)
10+
- Properly handle wrapping comments that include a numbered list in markdown [#5416](https://github.com/rust-lang/rustfmt/issues/5416)
11+
- Properly handle markdown sublists that utilize a `+` [#4041](https://github.com/rust-lang/rustfmt/issues/4210)
12+
- rustfmt will no longer use shorthand initialization when rewriting a tuple struct even when `use_field_init_shorthand = true` as this leads to code that could no longer compile.
13+
Take the following struct as an example `struct MyStruct(u64);`. rustfmt will no longer format `MyStruct { 0: 0 }` as `MyStruct { 0 }` [#5488](https://github.com/rust-lang/rustfmt/issues/5488)
14+
- rustfmt no longer panics when formatting an empty code block in a doc comment with `format_code_in_doc_comments = true` [#5234](https://github.com/rust-lang/rustfmt/issues/5234). For example:
15+
```rust
16+
/// ```
17+
///
18+
/// ```
19+
fn main() {}
20+
```
21+
- rustfmt no longer incorrectly duplicates the where clause bounds when using const expression in where clause bounds with feature `#![feature(generic_const_exprs)]` [#5691](https://github.com/rust-lang/rustfmt/issues/5691). e.g.:
22+
```rust
23+
struct S<const C: usize>
24+
where
25+
[(); { num_slots!(C) }]:, {
26+
// code ...
27+
}
28+
```
29+
- Prevent ICE when parsing invalid attributes in `cfg_if!` macros [#5728](https://github.com/rust-lang/rustfmt/issues/5728), [#5729](https://github.com/rust-lang/rustfmt/issues/5729)
30+
- rustfmt no longer loses comments placed between a doc comment and generic params [#5320](https://github.com/rust-lang/rustfmt/issues/5320)
31+
- Handle explicit discriminants in enums with comments present [#5686](https://github.com/rust-lang/rustfmt/issues/5686)
32+
33+
### Changed
34+
35+
- Users can now control whether rustc parser errors are displayed with color using rustfmt's `--color` option. To disable colored errors pass `--color=Never` to rustfmt [#5717](https://github.com/rust-lang/rustfmt/issues/5717)
36+
37+
38+
### Added
39+
40+
- rustfmt now recognises `+` as the start of a markdown list, and won't incorrectly wrap sublists that begin with `+` when formatting doc comments with `wrap_comments = true` [#5560](https://github.com/rust-lang/rustfmt/pull/5560)
41+
42+
### Misc
43+
44+
- Update various dependencies, including `syn`, `cargo_metadata`, `env_logger`, and `toml`
45+
546
## [1.5.2] 2023-01-24
647

748
### Fixed
@@ -56,6 +97,8 @@
5697

5798
- Simplify the rustfmt help text by eliding the full path to the rustfmt binary path from the usage string when running `rustfmt --help` [#5214](https://github.com/rust-lang/rustfmt/issues/5214)
5899

100+
- Bumped the version for serveral dependencies. Most notably `dirs` `v2.0.1` -> `v4.0.0`. This changed the global user config directory on macOS from `$HOME/Library/Preferences` to `$HOME/Library/Application Support` [#5237](https://github.com/rust-lang/rustfmt/pull/5237)
101+
59102
### Fixed
60103

61104
- Remove duplicate imports when `imports_granularity` is set to `Item` [#4725](https://github.com/rust-lang/rustfmt/issues/4725)

0 commit comments

Comments
 (0)