Skip to content

ci: create rustfmt configs when compiling each rustfmt binary#6775

Merged
ytmimi merged 1 commit into
rust-lang:mainfrom
ytmimi:reduce_config_allocations_in_diff_check
Jan 20, 2026
Merged

ci: create rustfmt configs when compiling each rustfmt binary#6775
ytmimi merged 1 commit into
rust-lang:mainfrom
ytmimi:reduce_config_allocations_in_diff_check

Conversation

@ytmimi
Copy link
Copy Markdown
Contributor

@ytmimi ytmimi commented Jan 20, 2026

A relatively minor improvement.

Before we would allocate a new string for the rustfmt configs every time we invoked rustfmt. This was unnecessary since the configs won't change during the runtime of check_diff.

Now we'll only create the configs for each binary once. Also, we'll only need to allocate a new string if the user passed a non-empty --rustfmt-config option when invoking check_diff.

Before we would allocate a new string for the rustfmt configs every
time we invoked rustfmt. This was unnecessary since the configs won't
change during the runtime of `check_diff`.

Now we'll only create the configs for each binary once. Also, we'll
only need to allocate a new string if the user passed a non-empty
`--rustfmt-config` option  when invoking `check_diff`.
@rustbot rustbot added the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label Jan 20, 2026
@ytmimi
Copy link
Copy Markdown
Contributor Author

ytmimi commented Jan 20, 2026

@jieyouxu no automatic CI label. Maybe we need to make another updated to the triagebot file?

@ytmimi ytmimi added the A-CI Area: CI label Jan 20, 2026
@jieyouxu
Copy link
Copy Markdown
Member

@jieyouxu no automatic CI label. Maybe we need to make another updated to the triagebot file?

I'll take a look

@jieyouxu jieyouxu self-assigned this Jan 20, 2026
@ytmimi
Copy link
Copy Markdown
Contributor Author

ytmimi commented Jan 20, 2026

@jieyouxu no automatic CI label. Maybe we need to make another updated to the triagebot file?

I'll take a look

I appreciate that. No rush though. We'll manage even if we have to manually add the labels for a little while longer.

@jieyouxu
Copy link
Copy Markdown
Member

I appreciate that. No rush though. We'll manage even if we have to manually add the labels for a little while longer.

#6776 might fix it, I think my rules were too specific previously (internally triagebot uses a globset).

Copy link
Copy Markdown
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks

View changes since this review

@ytmimi ytmimi merged commit 7321133 into rust-lang:main Jan 20, 2026
26 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label Jan 20, 2026
@ytmimi ytmimi deleted the reduce_config_allocations_in_diff_check branch January 20, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants