Skip to content

rustfmt subtree update (v1.12.0) - #165378

Merged
rust-bors[bot] merged 59 commits into
rust-lang:mainfrom
ytmimi:rustfmt-v1.12.0
Nov 3, 2026
Merged

rust-bors[bot] merged 59 commits into
rust-lang:mainfrom
ytmimi:rustfmt-v1.12.0

Conversation

@ytmimi

@ytmimi ytmimi commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

matthewhughes934 and others added 30 commits October 21, 2026 19:41
The main thing here is to be more explicit on assertions: e.g. to answer
are we expecting something to be printed to stdout or stderr?

I thought about rewriting the existing macro to handle this case too,
but couldn't find a good approach for that, and decided that the
plain code, while more lines, was more readable.
Firstly, Simplify the directory structure: we only need a single package here,
so drag everything up for that. Secondly, make it more explicit exactly
which config we expect to read by setting up configs with different
options, rather than just ignoring all formatting.

Also add tests for other existing behaviour: searching in `HOME` and
`XDG_CONFIG_HOME` when no config is given nor found.
So we can assert that `rustfmt` exits how we expect.
Allow `llm-assisted` label to be set by users without write access
I.e. do not try to use `{{ ... }}` concise double-block formatting if
there are comments in-between the outer/inner braces.
…omments

Don't lose comments and attributes between `cfg_select!` predicates, outer/inner blocks, arm body and trailing commas
Based on rustfmt issue 7215 it seems that we missed handling different kinds of
string literals. Before trying to address that issue I thought it would be best
if we refactored the match to be exhaustive.
…ontrol-brace-style

Have `cfg_select!` double-brace concise formatting respect `control_brace_style`
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
@jieyouxu

jieyouxu commented Nov 3, 2026

Copy link
Copy Markdown
Member

Okay, the rollup failed, so let's do this first.
@bors r+ p=6 rollup=never

@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

📌 Commit bb2e461 has been approved by jieyouxu

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 3, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 3, 2026
rustfmt subtree update (v1.12.0)



Subtree update of `rustfmt` to rust-lang/rustfmt@4408c4c.

Closes rust-lang/rustfmt#7225.

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

[See the CHANGELOG for all notable changes going out as part of `v1.12.0`](https://github.com/rust-lang/rustfmt/blob/main/CHANGELOG.md#1120-2026-12-24)

r? @jieyouxu
@fmease

fmease commented Nov 3, 2026

Copy link
Copy Markdown
Member

What do I need to change in my PR once the rustfmt sync has happened?

@jieyouxu

jieyouxu commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

What do I need to change in my PR once the rustfmt sync has happened?

Raced 😆 I left a comment in your PR :D

@ytmimi

ytmimi commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Assuming CI is green is there a simple patch we can apply to #162232 to make it work with this PR?

@jieyouxu

jieyouxu commented Nov 3, 2026

Copy link
Copy Markdown
Member

Assuming CI is green is there a simple patch we can apply to #162232 to make it work with this PR?

Raced x2 😆 See my comment in this PR 😆

@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 Nov 3, 2026
@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

💔 Test for fc7fbf5 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 Nov 3, 2026
@rust-bors rust-bors Bot mentioned this pull request Nov 3, 2026
@rust-bors

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-x86_64-gnu-nopt failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
thread '<unnamed>' (34679) panicked at src/tools/tidy/src/deps.rs:687:32:
cmd.exec() failed with `cargo metadata` exited with an error:     Blocking waiting for file lock on package cache
    Updating crates.io index
    Updating git repository `https://github.com/rust-lang/team`
error: failed to get `rust_team_data` as a dependency of package `site v0.1.0 (/checkout/src/tools/rustc-perf/site)`

Caused by:
  failed to load source for dependency `rust_team_data`

Caused by:
---
  SSL error: unknown error; class=Ssl (16)

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'deps (.)' (34358) panicked at src/tools/tidy/src/deps.rs:662:5:
a scoped thread panicked

thread 'main' (34355) panicked at src/tools/tidy/src/main.rs:51:5:
a scoped thread panicked
Bootstrap failed while executing `--stage 2 test`
Currently active steps:
test::Tidy {  } at src/bootstrap/src/core/build_steps/test.rs:1744
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy --root-path=/checkout --cargo-path=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo --output-dir=/checkout/obj/build --concurrency=4 --npm-path=yarn --ci=true` failed with exit code 101
Created at: src/bootstrap/src/core/build_steps/tool.rs:1627:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1829:24

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:01:10
  local time: Tue Nov  3 14:36:55 UTC 2026
  network time: Tue, 03 Nov 2026 14:36:55 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@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 Nov 3, 2026
@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jieyouxu
Duration: 3h 32m 30s
Pushing a94dce0 to main...

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

github-actions Bot commented Nov 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 6a98084 (parent) -> a94dce0 (this PR)

Test differences

Show 15 test diffs

Stage 1

  • config::test::test_adjust_max_width: pass -> [missing] (J0)
  • config_path_does_not_walk_parent_directories_with_toml_name: pass -> [missing] (J0)
  • config_path_errors_when_invalid_file_given: [missing] -> pass (J0)
  • inline_config: ignore -> [missing] (J0)
  • print_config_default: [missing] -> pass (J0)
  • print_config_errors_minimal_with_no_path: [missing] -> pass (J0)
  • print_config_errors_minimal_without_input_file: [missing] -> pass (J0)
  • print_config_errors_on_unknown_option: [missing] -> pass (J0)
  • print_config_merges_multiple_overrides_from_args: [missing] -> pass (J0)
  • print_config_merges_override_from_args: [missing] -> pass (J0)
  • print_config_writes_to_file: [missing] -> ignore (J0)
  • config_path_searches_config_dir_when_dir_path_no_resolve: [missing] -> pass (J1)
  • config_path_searches_home_dir_when_dir_path_no_resolve: [missing] -> pass (J1)

Additionally, 2 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 a94dce0bbb3aab81bfdcc30e8a55d7dc95bc644d --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-x86_64-mingw-2: 1h 42m -> 2h 57m (+73.4%)
  2. test-x86_64-msvc-ext1: 1h 22m -> 2h 15m (+63.7%)
  3. dist-various-2: 36m 18s -> 55m 58s (+54.2%)
  4. test-x86_64-gnu-llvm-22-3: 1h 16m -> 1h 53m (+48.9%)
  5. test-i686-msvc: 2h 24m -> 3h 30m (+45.3%)
  6. test-x86_64-gnu-nopt: 2h 42m -> 1h 35m (-41.4%)
  7. test-x86_64-msvc-1: 2h 51m -> 1h 44m (-39.1%)
  8. test-x86_64-gnu-stdlib-semver-check: 14m 10s -> 8m 40s (-38.8%)
  9. test-x86_64-msvc-ext2: 1h 19m -> 1h 49m (+37.0%)
  10. dist-x86_64-msvc: 3h 14m -> 2h 7m (-34.7%)
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 (a94dce0): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (secondary -2.0%)

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
Improvements ✅
(secondary)
-2.0% [-2.8%, -1.3%] 2
All ❌✅ (primary) - - 0

Cycles

Results (primary -3.0%)

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)
-3.0% [-3.0%, -3.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.0% [-3.0%, -3.0%] 1

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 482.475s -> 484.08s (0.33%)
Artifact size: 406.38 MiB -> 406.35 MiB (-0.01%)

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.

Tracking issue for subtree sync 2026-11-02 / rustfmt 1.12.0

9 participants