Skip to content

Commit b9d608c

Browse files
committed
Auto merge of #112821 - calebcartwright:rustfmt-sync, r=calebcartwright
update rustfmt changes described in https://github.com/rust-lang/rustfmt/blob/master/CHANGELOG.md#153-2023-06-20 r? `@ghost` cc `@rust-lang/rustfmt`
2 parents d7dcadc + aca66a2 commit b9d608c

Some content is hidden

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

51 files changed

+1634
-393
lines changed

Diff for: Cargo.lock

+12-27
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ dependencies = [
360360
name = "cargo-miri"
361361
version = "0.1.0"
362362
dependencies = [
363-
"cargo_metadata 0.15.3",
363+
"cargo_metadata",
364364
"directories",
365365
"rustc-build-sysroot",
366366
"rustc-workspace-hack",
@@ -381,22 +381,9 @@ dependencies = [
381381

382382
[[package]]
383383
name = "cargo_metadata"
384-
version = "0.14.0"
385-
source = "registry+https://github.com/rust-lang/crates.io-index"
386-
checksum = "c297bd3135f558552f99a0daa180876984ea2c4ffa7470314540dff8c654109a"
387-
dependencies = [
388-
"camino",
389-
"cargo-platform",
390-
"semver",
391-
"serde",
392-
"serde_json",
393-
]
394-
395-
[[package]]
396-
name = "cargo_metadata"
397-
version = "0.15.3"
384+
version = "0.15.4"
398385
source = "registry+https://github.com/rust-lang/crates.io-index"
399-
checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07"
386+
checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
400387
dependencies = [
401388
"camino",
402389
"cargo-platform",
@@ -631,7 +618,7 @@ name = "clippy_lints"
631618
version = "0.1.72"
632619
dependencies = [
633620
"arrayvec",
634-
"cargo_metadata 0.15.3",
621+
"cargo_metadata",
635622
"clippy_utils",
636623
"declare_clippy_lint",
637624
"if_chain",
@@ -4348,35 +4335,33 @@ dependencies = [
43484335
"proc-macro2",
43494336
"quote",
43504337
"serde",
4351-
"syn 1.0.102",
4338+
"syn 2.0.8",
43524339
]
43534340

43544341
[[package]]
43554342
name = "rustfmt-nightly"
4356-
version = "1.5.2"
4343+
version = "1.5.3"
43574344
dependencies = [
43584345
"annotate-snippets",
43594346
"anyhow",
43604347
"bytecount",
4361-
"cargo_metadata 0.14.0",
4362-
"clap 3.2.20",
4363-
"derive-new",
4348+
"cargo_metadata",
4349+
"clap 4.2.1",
43644350
"diff",
43654351
"dirs",
4366-
"env_logger 0.9.0",
4352+
"env_logger 0.10.0",
43674353
"getopts",
43684354
"ignore",
43694355
"itertools",
43704356
"lazy_static",
43714357
"log",
43724358
"regex",
4373-
"rustc-workspace-hack",
43744359
"rustfmt-config_proc_macro",
43754360
"serde",
43764361
"serde_json",
43774362
"term",
43784363
"thiserror",
4379-
"toml 0.5.7",
4364+
"toml 0.7.4",
43804365
"unicode-segmentation",
43814366
"unicode-width",
43824367
"unicode_categories",
@@ -4956,7 +4941,7 @@ name = "tidy"
49564941
version = "0.1.0"
49574942
dependencies = [
49584943
"cargo-platform",
4959-
"cargo_metadata 0.15.3",
4944+
"cargo_metadata",
49604945
"ignore",
49614946
"lazy_static",
49624947
"miropt-test-tools",
@@ -5192,7 +5177,7 @@ checksum = "191a442639ea102fa62671026047e51d574bfda44b7fdf32151d7314624c1cd2"
51925177
dependencies = [
51935178
"bstr",
51945179
"cargo-platform",
5195-
"cargo_metadata 0.15.3",
5180+
"cargo_metadata",
51965181
"color-eyre",
51975182
"colored",
51985183
"crossbeam-channel",

Diff for: 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

Diff for: 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

Diff for: src/tools/rustfmt/.travis.yml

-77
This file was deleted.

Diff for: 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)