Skip to content

rustfmt subtree update - #161964

Merged
rust-bors[bot] merged 138 commits into
rust-lang:mainfrom
jieyouxu:rustfmt-subtree-update
Aug 29, 2026
Merged

rustfmt subtree update#161964
rust-bors[bot] merged 138 commits into
rust-lang:mainfrom
jieyouxu:rustfmt-subtree-update

Conversation

@jieyouxu

Copy link
Copy Markdown
Member

Subtree-pull direction for rust-lang/rustfmt#7079.

As discussed in #t-rustfmt > need a sync ASAP @ 💬, we didn't bump version / do changelog between the subtree-push and this subtree-pull yet.

Last commit I had to regenerate the main workspace lockfile.

r? @ytmimi

jasonaowen and others added 30 commits June 12, 2026 14:47
When formatting a function with a single parameter with
`fn_params_layout` set to `Vertical`, the previous tactic would remove
any trailing commas before spilling to multiple lines for other reasons,
such as long function names or return types. Instead, use the same
tactic as `Tall` does, so that the trailing comma is kept if the end
result spans multiple lines.

`fn_params_layout = "Vertical"` is stable, so this is a breaking change.
Guard on the style edition so that it only takes effect starting in the
next edition.

Issue rust-lang#6889 `fn_params_layout = "Vertical"` removes single argument's
            trailing comma
Fix subtree sync doc commit message template markup
…om outer attributes

It's possible that at least one of the attributes is a custom proc macro that
takes the module tokens as an input. It's hard to know for sure since rustfmt
only operates on the AST pre-expansion. In this case we'll be overly permissive
and just ignore the file not found error so rustfmt can still try formatting the
input.

Fixes rustfmt issue 6959
…chenkov

rustfmt fix: allow file not found errors for external mods annotated with `#[my_macro]`

Tracking issue: rust-lang#54727

`#[my_macro]` was stabilized for macro hygiene 2.0 in rust-lang#157857. There isn't a guarantee that the external module exists on the file system so ignore any file not found errors encountered when trying to resolve the module's file.

Fixes rust-lang/rustfmt#6959

r? @petrochenkov

cc: @TimNN
…es, r=ytmimi,jieyouxu

rustfmt: Discover modules via `cfg_select!`

This PR renames all occurrences of `cfg_match!` in rustfmt to `cfg_select!`. This makes the module file detection logic from rust-lang/rustfmt#6522 kick in for `cfg_select!` instead of `cfg_match!`, which no longer exists.

This PR performs no other adjustments to the logic to be as small as possible.

I am opening this PR in this repo since that is also the target for the more comprehensive rust-lang#154202, which covers more than merely detecting other files through `cfg_select!`.

Closes rust-lang#158371.

CC: @ytmimi, @CAD97
Fixes 5973

The [attribute] docs in the rust reference explain that inner
attributes are allowed in block expressions.

[attribute]: https://doc.rust-lang.org/reference/attributes.html
…oc-attributes-docs

Fix normalize_doc_attributes configuration docs
We now have a much larger enterprise parallel job limit.
To make it easier to configure merge queue and reduce duplication.
…iling_comments_that_end_in_a_comma

tests: cover trailing comments that end in a comma
…990)

Co-authored-by: Yacin Tmimi <yacintmimi@gmail.com>
`cfg_select!` parsing needs to be implemented in rustfmt right now
because there's no good way to call `rustc_attr_parsing::parse_cfg_select`.
The plan is to leverage `rewrite_match_body` to help with `cfg_select!`
formatting.
ytmimi and others added 10 commits August 27, 2026 22:41
Bumping the toolchain version as part of a git subtree push.

Before:

```
1.99.0-nightly (9f36de7 2026-07-19)
```

After:

```
1.100.0-nightly (bff8e12 2026-08-26)
```
…26-08-27

subtree-push nightly-2026-08-27
Now we can configure which release channel the compiled rustfmt should target.
Because `CFG_RELEASE_CHANNEL` wasn't getting set before we'd default to the
`nightly` channel. For the most part that's not really an issue, but because
we're using the diff check to ensure that we're not changing stable formatting
it's more appropriate to default builds to the `stable` release channel.
…_diff.yml

The `release_channel` defaults to `stable`, but it might be nice in some cases
to test different release channels.
…diff_check

feature: Allow user's to set the release channel when running the diff check
This was added in fb517f4 but later
no longer used since 0cff306.
@rustbot

rustbot commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

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 Aug 29, 2026
@rustbot

This comment was marked as off-topic.

@jieyouxu jieyouxu added the subtree-sync PR updates a subtree (miri, clippy, etc). Ignored by no-merges check label Aug 29, 2026
@ytmimi

ytmimi commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

@bors r+ p=1 rollup=never

@rust-bors

rust-bors Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit e3e8a34 has been approved by ytmimi

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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 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 Aug 29, 2026
@rust-bors

rust-bors Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: ytmimi
Duration: 3h 16m 22s
Pushing fd7ed57 to main...

@rust-bors
rust-bors Bot merged commit fd7ed57 into rust-lang:main Aug 29, 2026
14 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 29, 2026
@github-actions

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 bdf8733 (parent) -> fd7ed57 (this PR)

Test differences

Show 10 test diffs

Stage 1

  • cargo_fmt_tests::targets::all_targets::cargo_fmt_strategy_root::assert_correct_targets_loaded_from_root: [missing] -> pass (J0)
  • rustfmt_nightly_usage_text: [missing] -> pass (J0)
  • rustfmt_usage_text: pass -> [missing] (J0)
  • test::emit_mode_from_inline_config_is_rejected: [missing] -> pass (J0)
  • test::warning_tests: [missing] -> pass (J0)

Additionally, 5 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 fd7ed57dfd3bdebb745a1d8158638727b0e7047a --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. x86_64-gnu-gcc: 48m 7s -> 1h 10m (+46.7%)
  2. x86_64-gnu-stdlib-semver-check: 18m 30s -> 10m 5s (-45.5%)
  3. dist-x86_64-msvc-alt: 1h 52m -> 2h 41m (+43.6%)
  4. x86_64-msvc-ext3: 1h 23m -> 1h 56m (+39.0%)
  5. dist-i686-msvc: 2h 7m -> 1h 19m (-38.0%)
  6. x86_64-gnu-gcc-core-tests: 17m 40s -> 11m 7s (-37.1%)
  7. i686-gnu-1: 2h 4m -> 1h 24m (-32.7%)
  8. dist-armv7-linux: 1h 12m -> 1h 34m (+29.7%)
  9. pr-check-1: 38m 9s -> 26m 59s (-29.3%)
  10. i686-gnu-nopt-2: 1h 49m -> 2h 20m (+27.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 (fd7ed57): 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)

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

Cycles

Results (secondary 0.5%)

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

Binary size

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

Bootstrap: 474.125s -> 476.157s (0.43%)
Artifact size: 402.92 MiB -> 402.84 MiB (-0.02%)

@jieyouxu
jieyouxu deleted the rustfmt-subtree-update branch August 30, 2026 07:41
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.