Skip to content

rustfmt subtree update - #163545

Merged
rust-bors[bot] merged 25 commits into
rust-lang:mainfrom
jieyouxu:rustfmt-subtree-push
Oct 3, 2026
Merged

rust-bors[bot] merged 25 commits into
rust-lang:mainfrom
jieyouxu:rustfmt-subtree-push

Conversation

@jieyouxu

@jieyouxu jieyouxu commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

rami3l and others added 25 commits September 21, 2026 17:28
To ensure compatibility with Josh. The old name is legacy anyway.
Rename `rust-toolchain` to `rust-toolchain.toml`
While processing children in a chain, e.g. the `1.foo.bar` in
`root.1.foo.bar` there was a check that would skip handling comments
(and so remove them) if the `use_try_shorthand` config option was set.
This is because earlier in the processing (trace: `Chain::from_ast` ->
`Chain::make_subexpr_list` -> `Chain::pop_expr_chain`) we would replace
`try!(..)` expressions with `?` ones but _not_ update spans, so things
would get confused later if we tried to use these spans to recover
comments.

However, it's not possible for a `try!` macro to appear as a child, e.g.
`root.try!(bar);`, so this check is unnecessary. There are added parser
failure tests to demonstrate this.

Aside: Of course a: `try!` can be the _root_ of a chain `try!(foo).bar` is
perfectly valid. And `?` can be used anywhere in a chain:
`foo.try!(bar)` is invalid, but `foo.bar?` is valid. This change only
focuses on the `try!` macros.

Fixes: rust-lang/rustfmt#6121
This updates the rust-toolchain.toml file to nightly-2026-09-23 (6bb1652).
This probably was needed at some point in the rust-lang/rust tree when
someone was tuning the lint itself? But in any case, we don't need this
anymore.
fix(config): search for config file recursively on `--config-path`
- related issues: rust-lang#5738, rust-lang#6137, rust-lang#6318, rust-lang#6378
- instead of calling unwrap(), restore original snippet when we fail to format generics in enum
- we need to propagate this rewrite failure later
- introduce format_enum that returns Rewrite
- early return when it fails to format the generics in enum
fix panic on failure to format generics in enum
Instead of overflows, or arguably worse, bitwise reinterpretations. They
tend to give us garbage (and massive) indentations.
Route rustfmt repo backport nominations to zulip
Use saturating arithmetics for `adjust_max_width`
@jieyouxu jieyouxu added the subtree-sync PR updates a subtree (miri, clippy, etc). Ignored by no-merges check label Sep 30, 2026
@rustbot

rustbot commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

rustfmt is developed in its own repository. If possible, consider making this change to rust-lang/rustfmt instead.

cc @rust-lang/rustfmt

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Sep 30, 2026
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 1, 2026
@rust-bors

rust-bors Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 42d340a failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors retry

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 1, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 1, 2026
rustfmt subtree update

Subtree update of `rustfmt` to rust-lang/rustfmt@677b954.

Created using https://github.com/rust-lang/josh-sync.

### Relnotes worthy (1.101 cycle)

https://github.com/rust-lang/rustfmt/pulls?q=is%3Apr+state%3Aclosed+merged%3A2026-09-22..2026-09-30 (excluding the v1.11.0 release prep PR):

* rust-lang/rustfmt#7115 (config search behavior)
* rust-lang/rustfmt#7095 (potentially breaking)
* rust-lang/rustfmt#6396
* rust-lang/rustfmt#7152 (but that's a fix for beta-regression)

### Needs beta backport (targetting 1.100)

I will make a beta-targetting cherry-pick with the following PR

* rust-lang/rustfmt#7152

---

r? @ytmimi
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 1, 2026
@rust-bors

rust-bors Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 3c10961 failed: CI. Failed job:

rust-bors Bot pushed a commit that referenced this pull request Oct 1, 2026
[beta] rustfmt backport

Cherry-pick of commits from rust-lang/rustfmt#7152 to address rust-lang/rustfmt#7147. The commits are cherry-picked from the subtree push #163545.

Approved in [#t-rustfmt/backports > rustfmt#7152: beta-nominated](https://rust-lang.zulipchat.com/#narrow/channel/621384-t-rustfmt.2Fbackports/topic/rustfmt.237152.3A.20beta-nominated/with/627991509).

I suppose this can be rolled up into a combined beta backport too. Anyway.

r? @ytmimi
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors retry

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 3, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 3, 2026
@rust-bors

rust-bors Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: ytmimi
Duration: 2h 51m 58s
Pushing d6b6dc7 to main...

@rust-bors
rust-bors Bot merged commit d6b6dc7 into rust-lang:main Oct 3, 2026
15 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing b6e4b5c (parent) -> d6b6dc7 (this PR)

Test differences

Show 9 test diffs

Stage 1

  • config::test::test_adjust_max_width: [missing] -> pass (J0)
  • config_path_does_not_walk_parent_directories_with_toml_name: [missing] -> pass (J0)
  • config_path_walks_parent_directories_with_dir_name: [missing] -> pass (J0)
  • test::parser::try_macro_cant_be_chain_child: [missing] -> pass (J0)
  • test::parser::try_macro_literal_cant_be_chain_child: [missing] -> pass (J0)

Additionally, 4 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard d6b6dc7982ef5d9117d96d018dfd83098d0471a1 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. test-i686-msvc: 1h 33m -> 2h 34m (+64.9%)
  2. test-x86_64-gnu-aux: 1h 38m -> 2h 38m (+60.7%)
  3. dist-x86_64-llvm-mingw: 1h 25m -> 2h 10m (+53.7%)
  4. dist-sparcv9-solaris: 1h 8m -> 1h 43m (+51.2%)
  5. test-x86_64-gnu-gcc: 53m 29s -> 1h 17m (+44.7%)
  6. dist-ohos-aarch64: 57m 50s -> 1h 22m (+43.3%)
  7. test-i686-gnu-nopt-2: 2h 23m -> 1h 23m (-41.5%)
  8. test-x86_64-gnu-llvm-22-1: 1h 18m -> 46m 4s (-41.2%)
  9. test-x86_64-gnu-next-trait-solver-polonius: 1h 1m -> 36m 10s (-41.0%)
  10. test-x86_64-gnu-nopt: 1h 33m -> 2h 10m (+39.9%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d6b6dc7): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [2.0%, 2.0%] 1

Cycles

Results (secondary 0.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
8.6% [6.4%, 10.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-5.9%, -3.5%] 3
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.1%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.2%, -0.0%] 51
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 46
All ❌✅ (primary) -0.1% [-0.2%, -0.0%] 51

Bootstrap: 490.028s -> 489.814s (-0.04%)
Artifact size: 407.45 MiB -> 406.62 MiB (-0.20%)

@jieyouxu
jieyouxu deleted the rustfmt-subtree-push branch October 3, 2026 13:06
gianlucamazza added a commit to gianlucamazza/orka that referenced this pull request Oct 10, 2026
…ries) (#45)

* style: apply rustfmt 1.11.0-nightly chain-format drift

Unpinned cargo +nightly fmt --check started failing on main after
rustfmt 1.11.0-nightly (db8f076d26 2026-10-03) shipped in
nightly-2026-10-04 via rust-lang/rust#163545.

Co-authored-by: Gianluca Mazza <gianlucamazza@users.noreply.github.com>

* fix(ci): allow clippy 1.99 async_trait and assert_is_empty lints

Unpinned stable is now rustc/clippy 1.99.0. After rustfmt passed, Check &
Test failed on clippy::double_must_use (async_trait-generated #[must_use]
on Pin<Box<dyn Future>>) and clippy::assert_is_empty (existing tests).

Co-authored-by: Gianluca Mazza <gianlucamazza@users.noreply.github.com>

* fix(ci): ignore unpatchable wasmtime 42.x RUSTSEC-2026-0321..0327

cargo audit failed Check & Test on four new wasmtime/wasmtime-wasi
42.0.2 advisories with no 42.x patch (fixes need >=48.0.4). Ignore
them in .cargo/audit.toml, deny.toml, and the CI CLI flags, tracked
by #47.

Also bump openssl 0.10.76 -> 0.10.81 and gix 0.81 -> 0.83 (first
unyanked GHSA-p3hw line). tokio-tar stays ignored: no 0.3.x patch.

Co-authored-by: Gianluca Mazza <gianlucamazza@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Gianluca Mazza <gianlucamazza@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. subtree-sync PR updates a subtree (miri, clippy, etc). Ignored by no-merges check T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants