Repository navigation
Conversation
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.
…est-updates Integration test updates
Fix `cfg_if!` error count leaks
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>
We used to need them for standalone binaries, but we no longer do. Remove the no longer used GHA workflow. Discussed in <https://rust-lang.zulipchat.com/#narrow/channel/357797-t-rustfmt/topic/What.20is.20upload-assets.20workflow.20supposed.20to.20do.3F/with/635506648>.
…d-assets Remove no longer used `upload-assets` GHA workflow
Rustc pull update 2026-11-02
Prepare for v1.12.0 release
Member
Author
|
@bors try jobs=test-x86_64-gnu-tools |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 3, 2026
… r=<try> [DO NOT MERGE] Test fix for subtree sync try-job: test-x86_64-gnu-tools
This is failing when we combine: 1. Actually checking exit code for `dont_emit_ICE`, and 2. rust-lang#162232 removing `builtin_syntax` `builtin #` (all editions) in favor of keyword prefixes `k#` as part of `forced_keywords`. Cause is simple: 1. `dont_emit_ICE` checks exit code. 2. One of the listed tests, `tests/target/issue_6159.rs` was previously using `builtin #` syntax which is parsed on all editions, including default 2015 edition. 3. rust-lang#162232 switched that test over to use `k#` reserved keyword syntax which is only Edition 2021+. Note the UI test actually get `//@ rustfmt-edition: 2021`. 4. `dont_emit_ICE` as an integration test does not set `--edition` explicitly, so Edition 2015 is used. 5. Now `issue_6159.rs` will not ICE but will fail to parse since it's on Edition 2015 not Edition 2021+. To fix it, just run rustfmt with `--edition=2021` for `issue_6159.rs` in `dont_emit_ICE` as well. Relevant links: - `builtin_syntax`: <rust-lang#110694> - MCP for switching to Edition 2021+ `k#` reserved keyword prefixes: <rust-lang/compiler-team#945> - Tracking issue for `forced_keywords`: <rust-lang#153839> - Impl of `forced_keywords`: rust-lang#161775 - Impl of MCP that also modified rustfmt tests to use `forced_keywords`: <rust-lang#162232>.
jieyouxu
force-pushed
the
jieyouxu/exp/rustfmt-builtin-syntax
branch
from
November 3, 2026 14:34
5676e60 to
6da7b55
Compare
Contributor
Member
|
The relevant commit has now been cherry-picked into #162232. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #165378 to accomodate #162232 changes.
Only last commit is relevant, this PR has cherry-picked commits from #162232.