Skip to content

Rollup of 7 pull requests#153673

Merged
rust-bors[bot] merged 21 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-cGOKonI
Mar 11, 2026
Merged

Rollup of 7 pull requests#153673
rust-bors[bot] merged 21 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-cGOKonI

Conversation

@JonathanBrouwer
Copy link
Contributor

@JonathanBrouwer JonathanBrouwer commented Mar 10, 2026

Shunpoco and others added 21 commits March 8, 2026 10:44
Currently extra_checks acts as a single check. It has some downsides:
- It is completely sequential. If one sub-check fails, next sub-checks are not executed
- sub-checks are not tracked on TidyCtx's failed checks

This commit extract those sub-chekcs into separate functions, and call tidy_ctx.start_check() in each function.
It also add start_check() for prepare functions (installing python/npm packages) because some sub-checks rely on them.
Currently `QueryVTable`'s `value_from_cycle_error` function pointer uses the `FromCycleError` trait to call query cycle handling code and to construct an erroneous query output value.
This trick however relies too heavily on trait impl specialization and makes those impls inconsistent (which is bad AFAIK).
Instead this commit directly modifies `value_from_cycle_error` function pointer upon vtable initialization and gets rid of `FromCycleError`.
It's defined in `rustc_span::source_map` which doesn't make any sense
because it has nothing to do with source maps. This commit moves it to
the crate root, a more sensible spot for something this basic.
…=lolbinarycat,kobzol

Introduce granular tidy_ctx's check in extra_checks

## Changes
This PR does:
- Extract sub checks in extra_checks to each function which takes a reference of TidyCtx
- Also extract python/npm dependency install steps to functions. They also calls tidy_ctx.start_check()

The changes introduce some benefits:
- A failure on one sub-check doesn't stop other sub-check (except py/npm install functions. Because some sub-checks rely on them)
- A failure on a sub-check is tracked on TidyCtx's error check

Verbose output (shortened):
<img width="904" height="1251" alt="image" src="https://github.com/user-attachments/assets/53df4029-a820-467e-b849-ac05c02b396e" />

## Question
I considered that I would decompose each sub-check more so that main.rs calls sub-checks directly and those sub-checks are executed concurrently. But to do so, I think
1. main.rs has to know some implementation details of extra_checks (for example, it might need to know ExtraCheckArg to decide which sub-checks should be called or not), and/or
2. we should decompose extra_checks/ dir to utilize check! macro for sub-checks.

I'd like to know your opinion/suggestion.
…r, r=nnethercote

Remove `FromCycleError` trait

Currently `QueryVTable`'s `value_from_cycle_error` function pointer uses the `FromCycleError` trait to call query cycle handling code and to construct an erroneous query output value. This trick however relies too heavily on trait impl specialization and makes those impls inconsistent (which is bad AFAIK). Instead this PR directly modifies `value_from_cycle_error` function pointer upon vtable initialization and gets rid of `FromCycleError`.

Removal of `FromCycleError` might also be a desired change for some developers involved in the query system development due to some other reasons.

This PR is split up into two commits. **Code formatting changes are isolated into the second commit for better git diffs in the first one.** Nice and simple refactor PR.

I got this idea from rust-lang#153470 (comment) discussion and thought it would be a pretty quick change to implement.

r? @nnethercote

I think this PR would benefit from your reviewer polish.
…nop, r=ehuss

tests/ui/binop: add annotations for reference rules
…Brouwer

Move `Spanned`.

It's defined in `rustc_span::source_map` which doesn't make any sense because it has nothing to do with source maps. This commit moves it to the crate root, a more sensible spot for something this basic.

r? @JonathanBrouwer
…athanBrouwer

Remove `TyCtxt::node_lint` method and `rustc_middle::lint_level` function

Part of rust-lang#153099.

With this PR, we can finally get rid of `lint_level`. \o/

r? @JonathanBrouwer
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 10, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 10, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 10, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #153560 (Introduce granular tidy_ctx's check in extra_checks)
 - #153666 (Add a regression test for #153599)
 - #153493 (Remove `FromCycleError` trait)
 - #153549 (tests/ui/binop: add annotations for reference rules)
 - #153641 (Move `Spanned`.)
 - #153663 (Remove `TyCtxt::node_lint` method and `rustc_middle::lint_level` function)
 - #153664 (Add test for #109804)
@JonathanBrouwer
Copy link
Contributor Author

@bors yield
Yielding to the bigger rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 10, 2026

Auto build was cancelled. Cancelled workflows:

The next pull request likely to be tested is #153672.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 11, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #153560 (Introduce granular tidy_ctx's check in extra_checks)
 - #153666 (Add a regression test for #153599)
 - #153493 (Remove `FromCycleError` trait)
 - #153549 (tests/ui/binop: add annotations for reference rules)
 - #153641 (Move `Spanned`.)
 - #153663 (Remove `TyCtxt::node_lint` method and `rustc_middle::lint_level` function)
 - #153664 (Add test for #109804)
@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 Mar 11, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 11, 2026

💔 Test for f910675 failed: CI. Failed job:

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-debug failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[1038/5488] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangBuiltinsEmitter.cpp.o
[1039/5488] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o
[1040/5488] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangBuiltinTemplatesEmitter.cpp.o

Session terminated, killing shell...::group::Clock drift check
  local time: Wed Mar 11 02:02:45 UTC 2026
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
  network time: [1041/5488] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentCommandInfoEmitter.cpp.o
[1042/5488] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp.o
[1043/5488] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLTagsEmitter.cpp.o

@JonathanBrouwer
Copy link
Contributor Author

@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 Mar 11, 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 Mar 11, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 11, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 13m 26s
Pushing b2fabe3 to main...

@rust-bors rust-bors bot merged commit b2fabe3 into rust-lang:main Mar 11, 2026
14 of 23 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 11, 2026
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#153493 Remove FromCycleError trait 0a76e0bb2c09dd0b1804ebc18c52d8d44df34e7c (link)
#153549 tests/ui/binop: add annotations for reference rules 06ab69f9ca115facb34010681617a394c134bd6d (link)
#153560 Introduce granular tidy_ctx's check in extra_checks 586577c7fdae4a5e30e1b570045ee5dc7f3c6783 (link)
#153641 Move Spanned. b6e795d0d097fb59874bce5d714b7b054410269f (link)
#153663 Remove TyCtxt::node_lint method and `rustc_middle::lint_l… a91356a34dec7da5e2ed1191df788fde91dcf922 (link)
#153664 Add test for #109804 6190c8f32d400a61f5632735fec0009090d3e08d (link)
#153666 Add a regression test for #153599 a6da727d4bdf60a38e5641e22cf823029d2e988d (link)

previous master: d1c79458b5

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions
Copy link
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 d1c7945 (parent) -> b2fabe3 (this PR)

Test differences

Show 556 test diffs

Stage 1

  • [ui] tests/ui/delegation/generics/stability-implications-non-local-defid.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/suggest-remove-reference-in-where-clause.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/delegation/generics/stability-implications-non-local-defid.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/suggest-remove-reference-in-where-clause.rs: [missing] -> pass (J0)

Additionally, 552 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 b2fabe39bde5174e8d728bb85f2b8d0572c35b74 --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. dist-aarch64-apple: 2h 41m -> 1h 37m (-39.4%)
  2. dist-x86_64-apple: 2h 14m -> 1h 45m (-21.7%)
  3. dist-aarch64-llvm-mingw: 1h 28m -> 1h 45m (+19.1%)
  4. x86_64-gnu-llvm-21-2: 1h 39m -> 1h 26m (-12.5%)
  5. x86_64-gnu: 2h 25m -> 2h 9m (-10.6%)
  6. x86_64-gnu-llvm-21-3: 1h 46m -> 1h 57m (+10.3%)
  7. tidy: 2m 37s -> 2m 53s (+10.1%)
  8. x86_64-gnu-llvm-21-1: 1h 14m -> 1h 7m (-9.2%)
  9. dist-powerpc-linux: 1h 23m -> 1h 31m (+9.2%)
  10. aarch64-apple: 2h 59m -> 2h 44m (-8.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
Collaborator

Finished benchmarking commit (b2fabe3): 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.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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)
2.7% [1.0%, 4.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.9% [-6.9%, -6.9%] 1
All ❌✅ (primary) - - 0

Cycles

Results (primary -1.8%)

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

Binary size

Results (primary 0.0%, 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.0% [0.0%, 0.1%] 26
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 19
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.1%] 26

Bootstrap: 479.3s -> 479.938s (0.13%)
Artifact size: 396.94 MiB -> 395.01 MiB (-0.49%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. 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.