Skip to content

update rustfmt #112821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 72 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
80d196d
Update rustfmt for ast::ExprKind::FormatArgs.
m-ou-se Jan 11, 2023
2791cc3
Teach parser to understand fake anonymous enum syntax
estebank Jan 15, 2023
4e3ed18
review comment: Remove AST AnonTy
estebank Jan 23, 2023
094b7f5
Merge commit '1d8491b120223272b13451fc81265aa64f7f4d5b' into sync-fro…
calebcartwright Jan 24, 2023
1d9afb2
Rollup merge of #106960 - estebank:parse-anon-enums, r=cjgillot
matthiaskrgr Jan 26, 2023
6d13315
Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk
bors Jan 26, 2023
567bd97
Document which comments are excluded from wrapping (#5637)
krtab Jan 28, 2023
bcfc57e
added tests (#5619)
amab8901 Jan 28, 2023
b08130c
Fix #5234 - handling of empty code block (#5601)
davidBar-On Jan 29, 2023
61d82ac
refactor: fix typo in comment (#5581)
TomAFrench Jan 29, 2023
9cc0af5
Remove old CI config (#5572)
JohnTitor Jan 29, 2023
fb1a223
Remove use of actions-rs (#5571)
JohnTitor Jan 29, 2023
846662c
Don't wrap comments that are part of a table
ayazhafiz May 30, 2020
368a633
Fix typo
Nemo157 Sep 10, 2022
cdd0b56
Test that both table headers and values are not wrapped
Nemo157 Sep 10, 2022
3f36c99
Test that with all comment wrapping disabled table comments are not w…
Nemo157 Sep 10, 2022
e2996a8
Lists doc comments fix4041 (#5560)
thaqibm Feb 2, 2023
5391847
Fix #5488 - prevent shorthand init for tuple struct
RajivTS Aug 27, 2022
c6b822d
Rename `Cursor`/`CursorRef` as `TokenTreeCursor`/`RefTokenTreeCursor`.
nnethercote Feb 1, 2023
24f4ece
Introduce `-Zterminal-urls` to use OSC8 for error codes
estebank Feb 9, 2023
34f9ca2
fix: use correct span for struct generics
calebcartwright Feb 16, 2023
af75a2f
Use `ThinVec` in various AST types.
nnethercote Nov 23, 2022
23007fc
Use `ThinVec` in `ast::Block`.
nnethercote Jan 30, 2023
01ed9dd
Use `ThinVec` in a few more AST types.
nnethercote Jan 30, 2023
8b7f811
errors: generate typed identifiers in each crate
davidtwco Oct 13, 2022
386ea37
various: translation resources from cg backend
davidtwco Oct 17, 2022
a5ba6e0
Remove uses of `box_syntax` in rustc and tools
clubby789 Feb 27, 2023
4e658cc
Remove `box_syntax` from AST and use in tools
clubby789 Feb 27, 2023
3ef194c
Remove the `NodeId` of `ast::ExprKind::Async`
Swatinem Jan 31, 2023
809dd77
rustc: Remove unused `Session` argument from some attribute functions
petrochenkov Mar 19, 2023
9510f7e
Merge from rustc
oli-obk Mar 23, 2023
5cbb08d
Rollup merge of #109354 - Swatinem:rm-closureid, r=compiler-errors
GuillaumeGomez Mar 27, 2023
475396a
Prevent ICE when calling parse_attribute in parse_cfg_if_inner
ytmimi Mar 30, 2023
a3b2bfc
Honor --color option when emitting errors
Sindisil Mar 27, 2023
5effe61
Merge from rustc
oli-obk Apr 4, 2023
c2890ec
rust-analyzer guided enum variant structification
oli-obk Mar 29, 2023
ced3cd8
rust-analyzer guided tuple field to named field
oli-obk Mar 29, 2023
3ecb9ed
Split out ast::ItemKind::Const into its own struct
oli-obk Mar 29, 2023
f178139
box a bunch of large types
oli-obk Mar 29, 2023
f533800
Merge from rustc
saethlin Apr 10, 2023
84385bf
offset_of
beepster4096 Sep 11, 2022
ecfdec4
minor tweaks
beepster4096 Apr 21, 2023
f4c9b4c
rustfmt fmt
beepster4096 Apr 21, 2023
afe34c8
Merge from rustc
RalfJung Apr 22, 2023
6b9c151
Tweak await span
compiler-errors Apr 25, 2023
a44c7ea
fix broken markdown
Apr 27, 2023
4eb1b52
Merge from rustc
RalfJung Apr 30, 2023
a74d2d7
fix tests
chenyukang Mar 14, 2023
9d20134
remove rustfmt testcase for type ascription
chenyukang Apr 4, 2023
4351e50
Auto merge of #111036 - RalfJung:miri, r=RalfJung
bors May 1, 2023
34a71f6
Make the BUG_REPORT_URL configurable by tools
jyn514 Apr 29, 2023
ae213e2
Auto merge of #109128 - chenyukang:yukang/remove-type-ascription, r=e…
bors May 2, 2023
8e330f9
Make tools happy
compiler-errors Apr 25, 2023
8ed5d5d
Rustfmt support for negative bounds, test
compiler-errors Apr 26, 2023
48e380f
Rollup merge of #110989 - jyn514:bug-report-url, r=WaffleLapkin
matthiaskrgr May 6, 2023
e903fcd
Remove rustc-workspace-hack
ehuss Jun 4, 2023
5f9de6b
Recover comments between attrs and generic param
fee1-dead Jun 10, 2023
0441cc2
Add release notes for closed PRs with `release-notes` label
ytmimi Apr 27, 2023
c9ebd6c
doc: remove installing from source
xxchan Jun 19, 2023
8d95c26
update config_proc_macro to use `syn` 2.0
fee1-dead Apr 12, 2023
7d48be3
bump deps to new versions that use syn 2.0
fee1-dead Apr 12, 2023
a463f23
remove `derive_new` dependency
fee1-dead Apr 12, 2023
ac2ebd3
Prevent ICE when calling parse_attribute without an attribute
ytmimi Mar 30, 2023
2c30fa5
Adjust enum variant spans to exclude any explicit discriminant
ytmimi Feb 7, 2023
66b9951
update some dependencies
kadiwa4 Jan 31, 2023
f4201ef
Handling of numbered markdown lists.
Oct 10, 2022
312a86b
Merge remote-tracking branch 'upstream/master' into subtree-sync-2023…
calebcartwright Jun 20, 2023
0b17d7e
chore: address merge and bump toolchain
calebcartwright Jun 20, 2023
ec8a4d4
Merge pull request #5788 from calebcartwright/subtree-sync-2023-06-19
calebcartwright Jun 20, 2023
3f7c366
chore: release v1.5.3
calebcartwright Jun 20, 2023
08384b8
Merge commit '3f7c366fc0464e01ddcaefbd70647cb3da4202be' into rustfmt-…
calebcartwright Jun 20, 2023
aca66a2
update lockfile for rustfmt sync
calebcartwright Jun 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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