Skip to content

Commit

Permalink
Auto merge of #112821 - calebcartwright:rustfmt-sync, r=calebcartwright
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Jun 20, 2023
2 parents d7dcadc + aca66a2 commit b9d608c
Show file tree
Hide file tree
Showing 51 changed files with 1,634 additions and 393 deletions.
39 changes: 12 additions & 27 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ dependencies = [
name = "cargo-miri"
version = "0.1.0"
dependencies = [
"cargo_metadata 0.15.3",
"cargo_metadata",
"directories",
"rustc-build-sysroot",
"rustc-workspace-hack",
Expand All @@ -381,22 +381,9 @@ dependencies = [

[[package]]
name = "cargo_metadata"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c297bd3135f558552f99a0daa180876984ea2c4ffa7470314540dff8c654109a"
dependencies = [
"camino",
"cargo-platform",
"semver",
"serde",
"serde_json",
]

[[package]]
name = "cargo_metadata"
version = "0.15.3"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07"
checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
dependencies = [
"camino",
"cargo-platform",
Expand Down Expand Up @@ -631,7 +618,7 @@ name = "clippy_lints"
version = "0.1.72"
dependencies = [
"arrayvec",
"cargo_metadata 0.15.3",
"cargo_metadata",
"clippy_utils",
"declare_clippy_lint",
"if_chain",
Expand Down Expand Up @@ -4348,35 +4335,33 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 1.0.102",
"syn 2.0.8",
]

[[package]]
name = "rustfmt-nightly"
version = "1.5.2"
version = "1.5.3"
dependencies = [
"annotate-snippets",
"anyhow",
"bytecount",
"cargo_metadata 0.14.0",
"clap 3.2.20",
"derive-new",
"cargo_metadata",
"clap 4.2.1",
"diff",
"dirs",
"env_logger 0.9.0",
"env_logger 0.10.0",
"getopts",
"ignore",
"itertools",
"lazy_static",
"log",
"regex",
"rustc-workspace-hack",
"rustfmt-config_proc_macro",
"serde",
"serde_json",
"term",
"thiserror",
"toml 0.5.7",
"toml 0.7.4",
"unicode-segmentation",
"unicode-width",
"unicode_categories",
Expand Down Expand Up @@ -4956,7 +4941,7 @@ name = "tidy"
version = "0.1.0"
dependencies = [
"cargo-platform",
"cargo_metadata 0.15.3",
"cargo_metadata",
"ignore",
"lazy_static",
"miropt-test-tools",
Expand Down Expand Up @@ -5192,7 +5177,7 @@ checksum = "191a442639ea102fa62671026047e51d574bfda44b7fdf32151d7314624c1cd2"
dependencies = [
"bstr",
"cargo-platform",
"cargo_metadata 0.15.3",
"cargo_metadata",
"color-eyre",
"colored",
"crossbeam-channel",
Expand Down
3 changes: 0 additions & 3 deletions src/tools/rustfmt/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@ indent_size = unset
indent_style = unset
trim_trailing_whitespace = unset
insert_final_newline = unset

[appveyor.yml]
end_of_line = unset
5 changes: 1 addition & 4 deletions src/tools/rustfmt/.github/workflows/upload-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ jobs:
shell: bash

- name: Build release binaries
uses: actions-rs/cargo@v1
with:
command: build
args: --release
run: cargo build --release

- name: Build archive
shell: bash
Expand Down
77 changes: 0 additions & 77 deletions src/tools/rustfmt/.travis.yml

This file was deleted.

43 changes: 43 additions & 0 deletions src/tools/rustfmt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,47 @@

## [Unreleased]

## [1.5.3] 2023-06-20

### Fixed

- When formatting doc comments with `wrap_comments = true` rustfmt will no longer wrap markdown tables [#4210](https://github.com/rust-lang/rustfmt/issues/4210)
- Properly handle wrapping comments that include a numbered list in markdown [#5416](https://github.com/rust-lang/rustfmt/issues/5416)
- Properly handle markdown sublists that utilize a `+` [#4041](https://github.com/rust-lang/rustfmt/issues/4210)
- 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.
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)
- 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:
```rust
/// ```
///
/// ```
fn main() {}
```
- 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.:
```rust
struct S<const C: usize>
where
[(); { num_slots!(C) }]:, {
// code ...
}
```
- 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)
- rustfmt no longer loses comments placed between a doc comment and generic params [#5320](https://github.com/rust-lang/rustfmt/issues/5320)
- Handle explicit discriminants in enums with comments present [#5686](https://github.com/rust-lang/rustfmt/issues/5686)

### Changed

- 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)


### Added

- 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)

### Misc

- Update various dependencies, including `syn`, `cargo_metadata`, `env_logger`, and `toml`

## [1.5.2] 2023-01-24

### Fixed
Expand Down Expand Up @@ -56,6 +97,8 @@

- 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)

- 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)

### Fixed

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

0 comments on commit b9d608c

Please sign in to comment.