Skip to content

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

RalfJung and others added 16 commits November 30, 2025 14:25
…pt, r=petrochenkov

hir_owner_parent optimized to inlined call for non-incremental build

Continuation of rust-lang#146880 and rust-lang#147232.
'hir_owner_parent' query renamed 'hir_owner_parent_q'. hir_owner_parent inlined function added to optimize performance in case of non-incremental build.

'hir_owner_parent' query has low normalized average execution time (163ns) and good cache_hits (5773) according Daria's processed statistics. 'source_span', for comparison, has avg_ns_norm = 66ns and cache_hits = 11361.

Optimization may be profitable for queries with low normalized average execution time (to replace cache lookup into inlined call) and be significant with good cache_hits.
| Query | cache_hits | min_ns | max_ns | avg_ns_norm |
| ------------- | ------------- | ------------- | ------------- | ------------- |
source_span | 11361 | 18 | 2991 | 66
hir_owner_parent | 5773 | 52 | 1773 | 163
is_doc_hidden | 3134 | 47 | 1111 | 285
lookup_deprecation_entry | 13905 | 36 | 6208 | 287
object_lifetime_default | 5840 | 63 | 4688 | 290
upvars_mentioned | 2575 | 75 | 7722 | 322
intrinsic_raw | 21235 | 73 | 3453 | 367

Draft PR to measure performance changes.
…-placeholder-pt2, r=lcnr

Move struct placeholder pt2

r? ghost
…, r=petrochenkov

Suggest ignore returning value inside macro for unused_must_use lint

Fixes rust-lang#151269

The first commit fix the original issue,
the second commit is a code refactoring in this lint.
Rename, clarify, and document code for "erasing" query values

In order to reduce compile times and code size for the compiler itself, the query system has a mechanism for “erasing” and ”restoring” query values in certain contexts. See rust-lang#109333 for the original implementation.

Unfortunately, the erasure system has very little documentation, and involves a dizzying assortment of similarly-named types, traits, and functions.

This PR therefore renames several parts of the erasure API and implementation to hopefully be clearer, and adds comments to better explain the purpose and mechanism behind value erasure.

Summary of renames:
- fn `erase` → `erase_val` (avoiding ambiguity with module `erase`)
- fn `restore` → `restore_val`
- type `Erase<T>` → `Erased<T>` (for actual erased values of `T`)
- trait `EraseType` → `Erasable` (for types that can be erased and restored)
- associated type `EraseType::Result` → `Erasable::Storage`
- implementation-detail struct `Erased<T>` → `ErasedData<Storage>`

There should be no change to compiler behaviour.
thread::scope: document how join interacts with TLS destructors

Fixes rust-lang#116237 by documenting the current behavior regarding thread-local destructors as intended. (I'm not stoked about this, but documenting it is better than leaving it unclear.)

This also adds documentation for explicit `join` calls (both for scoped and regular threads), saying that those *will* wait for TLS destructors. That reflects my understanding of the current implementation, which calls `join` on the native thread handle. Are we okay with guaranteeing that? I think we should, so people have at least some chance of implementing "wait for all destructors" manually. This fixes rust-lang#127571.

Cc @rust-lang/libs-api
…szelmann,JonathanBrouwer

Use `Rustc` prefix for `rustc` attrs in `AttributeKind`

cc rust-lang#131229

Most `rustc_...` attrs have their variants named `RustcAttrName`, but several do not. Rename these attributes for consistency.

r? @jdonszelmann
…uwer

Treat unions as 'data types' in attr parsing diagnostics

I found 'data types _and_ unions' to be a little surprising
…illaumeGomez

Update `askama` version to `0.15.4`

Hopefully it's the last `askama` update before a while. ^^'

r? ghost
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Jan 29, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jan 29, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 29, 2026

📌 Commit 0f318f9 has been approved by JonathanBrouwer

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

rust-bors bot commented Jan 29, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 36m 15s
Pushing 842bd5b to main...

@rust-bors rust-bors bot merged commit 842bd5b into rust-lang:main Jan 29, 2026
12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 29, 2026
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#147387 hir_owner_parent optimized to inlined call for non-incremen… 9fb64fcc1557291c38c1acd22a3e5e4221180fd8 (link)
#149482 thread::scope: document how join interacts with TLS destruc… baae1e2a0c2e6ab32d7d38ac4d488d75df919671 (link)
#150271 Move struct placeholder pt2 ec981e31d935a986f124b23e450c7b4cc4149d8c (link)
#151283 Suggest ignore returning value inside macro for unused_must… c9dfd9e09cb3b6bbd88247c61c9e957220cc7f05 (link)
#151565 Rename, clarify, and document code for "erasing" query valu… 6da7a99b89003dbaa50b3b43dccf9d7ee9b09387 (link)
#151827 Use Rustc prefix for rustc attrs in AttributeKind 74a6d240b02b2783a897031decbc81450f2b3ed0 (link)
#151833 Treat unions as 'data types' in attr parsing diagnostics f6da8d2a020497f2c004aed57c19d433569dd95a (link)
#151834 Update askama version to 0.15.4 085dae2dbc2aaa6cd9d82bf8cdcdb3dd463f4166 (link)

previous master: 370143facf

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 370143f (parent) -> 842bd5b (this PR)

Test differences

Show 308 test diffs

Stage 1

  • [ui] tests/ui/lint/unused/lint-unsed-in-macro-issue-151269.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/lint/unused/lint-unsed-in-macro-issue-151269.rs: [missing] -> pass (J0)

Additionally, 306 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 842bd5be253e17831e318fdbd9d01d716557cc75 --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-apple-various: 3297.4s -> 4144.7s (+25.7%)
  2. dist-aarch64-apple: 9913.1s -> 7968.9s (-19.6%)
  3. dist-x86_64-apple: 7774.2s -> 8599.5s (+10.6%)
  4. dist-x86_64-msvc-alt: 9885.3s -> 8957.1s (-9.4%)
  5. x86_64-msvc-ext1: 7287.5s -> 7950.8s (+9.1%)
  6. dist-aarch64-linux: 6911.9s -> 6297.5s (-8.9%)
  7. aarch64-gnu-llvm-20-1: 3569.7s -> 3875.2s (+8.6%)
  8. i686-gnu-1: 8650.8s -> 7923.9s (-8.4%)
  9. dist-s390x-linux: 5385.8s -> 5813.9s (+7.9%)
  10. dist-x86_64-linux-alt: 8763.1s -> 9448.5s (+7.8%)
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 (842bd5b): comparison URL.

Overall result: ✅ 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
Improvements ✅
(primary)
-0.2% [-0.3%, -0.2%] 4
Improvements ✅
(secondary)
-0.7% [-1.1%, -0.2%] 6
All ❌✅ (primary) -0.2% [-0.3%, -0.2%] 4

Max RSS (memory usage)

Results (primary 0.8%, secondary -1.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-4.3%, -1.1%] 2
All ❌✅ (primary) 0.8% [0.8%, 0.8%] 1

Cycles

Results (primary -8.8%, secondary -2.3%)

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)
-8.8% [-13.7%, -2.3%] 10
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) -8.8% [-13.7%, -2.3%] 10

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 474.117s -> 473.781s (-0.07%)
Artifact size: 397.79 MiB -> 397.87 MiB (0.02%)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants