Skip to content

Rollup of 12 pull requests#156267

Merged
rust-bors[bot] merged 33 commits intorust-lang:mainfrom
jhpratt:rollup-xaL6466
May 7, 2026
Merged

Rollup of 12 pull requests#156267
rust-bors[bot] merged 33 commits intorust-lang:mainfrom
jhpratt:rollup-xaL6466

Conversation

@jhpratt
Copy link
Copy Markdown
Member

@jhpratt jhpratt commented May 7, 2026

Successful merges:

r? @ghost

Create a similar rollup

nnethercote and others added 30 commits May 4, 2026 14:29
- Improve a comment.
- Remove unused `[decode]` annotations on some arenas.
- Improve `impl_arena_allocatable_decoder`:
  - Make the first rule more like the second rule.
  - Remove unnecessary brackets.
  - Remove unused support for attributes other than `decode`.
The table names usually match the name of the corresponding query.
The `trait_impl_trait_tys` table is an exception; this commit renames it
`collect_return_position_impl_trait_in_trait_tys` to match the query.
- Remove comment about blanket implementation of `FallibleTypeFolder` --
  it does not exist. (It probably used to.)
- Fix some incorrect name references.
- Fix minor grammatical errors.
- Fix stale comment on `visit_region` -- it was a no-op once, but no
  longer.

LLM disclosure: Claude Code identified these problems with comments when
I asked it to review `fold.rs` and `visit.rs`. I verified the
correctness of the problems and made the changes by hand.
After llvm/llvm-project#195486 , LLVM has explicit handling for null
pointers in simd operations instead of using special handling based on
zeroes.

This causes LLVM with asserts enabled to detect an improperly typed mask
passed to splat (if the output vector does not have i32 elements), and
can cause SIGSEGV in more complex cases with asserts disabled.
- Introduce `HAS_REGIONS`/`has_regions`, which is true if any regions
  are present.
- Add `fold_clauses` to `Shifter` and `RegionFolder` for consistency.
- Simplify `has_type_flags`.
- Remove unnecessary local variables in `HasTypeFlagsVisitor` methods.
- Use `|=` operator in one place.
- Avoid `is_break` in one place for consistency with nearby code.

LLM disclosure: Claude Code suggested these changes when I asked it to
review `fold.rs` and `visit.rs`. I verified the correctness of the
suggestions and made the changes by hand.
Background:
* During this refactor, the Trusty OS was not targeted in the cfg_select
  rust-lang@e259373
also update the test to make sure there's an error
Like we do for other things for better experience in rust-analyzer.

It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId.

It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf.
This commit updates the documentation for WASI targets in the rustc book
to mention a minimum version of wasi-sdk that's required.

Closes 155971
…trochenkov

Fewer global node_id_to_def_id lookups

Several of these are unnecessary if we track the `LocalDefId` together with the `NodeId`. We can't remove the `NodeId` entirely, as it is needed for lints, but it's a useful refactoring for splitting node_id_to_def_id into a per-owner table in the future

r? @petrochenkov
…isDenton

windows/time: avoid being too close to 0

Fixes rust-lang#156142 (but only for Windows -- should we still track it for non-tier-1-platforms?)
… r=mejrs

Deny warnings in the test for crates that are available on stable

We've got a couple of crates, like `rustc_type_ir` that have parts disabled on stable. I believe part of this is so, for example, rust-analyzer can use bits of the compiler. We previously allowed warnings here, and I ran into one. This denies warnings in the test that compiles these stable crates (I chose not to on the crate itself, so you don't *constantly* run into the warnings if you have turned that off in `config.toml`). This test doesn't run by default, but it does run in CI.
Use special DefIds for aliases

Renewal of rust-lang#155025, after `AliasTermKind` was also ported.

Like we do for other things for better experience in rust-analyzer.

It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId.

It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that?

r? lcnr
…affleLapkin

Fold/visit tweaks

Details in individual commits.

r? @WaffleLapkin
… r=Zalathar

Metadata macro/query cleanups

Details in individual commits.

r? @Zalathar
llvm: Use correct type for splat mask

After llvm/llvm-project#195486 , LLVM has explicit handling for null pointers in simd operations instead of using special handling based on zeroes.

This causes LLVM with asserts enabled to detect an improperly typed mask passed to splat (if the output vector does not have i32 elements), and can cause SIGSEGV in more complex cases with asserts disabled.

@rustbot label: +llvm-main

r? @durin42
… r=oli-obk

Refactor `Type::size` field to `TypeId::size` method for `type_info`

Tracking issue rust-lang#146922

r? @oli-obk
…ison

Add Trusty OS to the generic error implementation.

Background:
* During this refactor, the Trusty OS was not targeted in the cfg_select: rust-lang@e259373

r? @randomPoison
@rustbot rustbot added T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels May 7, 2026
@jhpratt
Copy link
Copy Markdown
Member Author

jhpratt commented May 7, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 7, 2026

📌 Commit f84a2cd has been approved by jhpratt

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 May 7, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 7, 2026
Rollup of 12 pull requests

Successful merges:

 - #156173 (Fewer global node_id_to_def_id lookups)
 - #156177 (windows/time: avoid being too close to 0)
 - #155961 (Deny warnings in the test for crates that are available on stable)
 - #155981 (Use special DefIds for aliases)
 - #156130 (Fold/visit tweaks)
 - #156131 (Metadata macro/query cleanups)
 - #156202 (llvm: Use correct type for splat mask)
 - #156223 (Refactor `Type::size` field to `TypeId::size` method for `type_info`)
 - #156227 (Add Trusty OS to the generic error implementation.)
 - #156237 (compiletest: prevent directives from having multiple revisions)
 - #156241 (Move tests coercion)
 - #156258 (Document wasi-sdk minimum versions for WASI targets)
@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 May 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 7, 2026

💔 Test for c2705f8 failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors retry
@bors try jobs=x86_64-msvc-ext1

@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 May 7, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 7, 2026
Rollup of 12 pull requests


try-job: x86_64-msvc-ext1
@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 7, 2026

☀️ Try build successful (CI)
Build commit: a9ce0a1 (a9ce0a1f17da12e141a1b7b6b1db3f1c2bd545cf, parent: 0e5924a4a0b57f2c6bc8cac93f59281e68541a91)

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

rust-bors Bot commented May 7, 2026

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 7m 14s
Pushing 32bd660 to main...

@rust-bors rust-bors Bot merged commit 32bd660 into rust-lang:main May 7, 2026
13 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

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 0e5924a (parent) -> 32bd660 (this PR)

Test differences

Show 59 test diffs

Stage 0

  • directives::tests::test_multiple_revisions_in_directive: [missing] -> pass (J2)

Stage 1

  • [ui] tests/ui/coercion/coerce-bare-fn-returning-zst-to-closure.rs: [missing] -> pass (J1)
  • [ui] tests/ui/coercion/coerce-mut-ref-to-raw-ptr-borrow-expires.rs: [missing] -> pass (J1)
  • [ui] tests/ui/coercion/coerce-trait-object-removes-send-bound.rs: [missing] -> pass (J1)
  • [ui] tests/ui/coercion/variance-coerce-unsized-cycle.rs: [missing] -> pass (J1)
  • [ui] tests/ui/issues/issue-18539.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-33387.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-47722.rs: pass -> [missing] (J1)

Stage 2

  • [ui] tests/ui/coercion/coerce-bare-fn-returning-zst-to-closure.rs: [missing] -> pass (J0)
  • [ui] tests/ui/coercion/coerce-mut-ref-to-raw-ptr-borrow-expires.rs: [missing] -> pass (J0)
  • [ui] tests/ui/coercion/coerce-trait-object-removes-send-bound.rs: [missing] -> pass (J0)
  • [ui] tests/ui/coercion/variance-coerce-unsized-cycle.rs: [missing] -> pass (J0)
  • [ui] tests/ui/issues/issue-18539.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-33387.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-47722.rs: pass -> [missing] (J0)

Additionally, 42 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 32bd660612bf1c61bdf290a3ec643c8538b8357d --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-msvc-1: 2h 45m -> 1h 59m (-27.8%)
  2. dist-i586-gnu-i586-i686-musl: 1h 16m -> 1h 35m (+25.1%)
  3. dist-armv7-linux: 1h 14m -> 1h 32m (+24.2%)
  4. dist-loongarch64-linux: 1h 30m -> 1h 51m (+23.0%)
  5. dist-aarch64-apple: 2h 3m -> 2h 29m (+20.3%)
  6. x86_64-msvc-ext3: 1h 45m -> 1h 23m (-20.1%)
  7. dist-apple-various: 2h 6m -> 1h 40m (-20.1%)
  8. dist-ohos-aarch64: 1h 18m -> 1h 4m (-17.9%)
  9. pr-check-1: 32m 37s -> 26m 55s (-17.4%)
  10. armhf-gnu: 1h 14m -> 1h 26m (+16.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
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#155961 Deny warnings in the test for crates that are available on … 8dae744ae24cc0b1f0f4558023489700831ad96a (link)
#155981 Use special DefIds for aliases 48cfb599723de5a69a233d93c7db8a019c8c1802 (link)
#156130 Fold/visit tweaks 744b6ba91fa47eb09291001bce0c0f413ae6167c (link)
#156131 Metadata macro/query cleanups d3f047ad163ebef798e5f774ef0a596ba46b3ce8 (link)
#156173 Fewer global node_id_to_def_id lookups f36f177aa4d886b222d18c992c68af912d71031d (link)
#156177 windows/time: avoid being too close to 0 0706a0a12bc0546f3c3769bedea8db5a784a5b86 (link)
#156202 llvm: Use correct type for splat mask cabd0ffe7d7a01da7d7375ccced5bc80b1d07c9e (link)
#156223 Refactor Type::size field to TypeId::size method for `t… 6168e9c3381ab59eb9008eeba0a18fbd4b6996d3 (link)
#156227 Add Trusty OS to the generic error implementation. 75e2bb7b50aa8bba74ac096bdf367e7a68fb256a (link)
#156237 compiletest: prevent directives from having multiple revisi… aaf36593e0a917d4b4d5027aa833262b78606179 (link)
#156241 Move tests coercion e9e513b742c3fd9ac0fb9e1b99b4d915922be762 (link)
#156258 Document wasi-sdk minimum versions for WASI targets c1bc2e61197dab7fcbfcbf90f6ab630784535ab2 (link)

previous master: 0e5924a4a0

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

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (32bd660): 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.3% [-0.3%, -0.2%] 8
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 2
All ❌✅ (primary) -0.3% [-0.3%, -0.2%] 8

Max RSS (memory usage)

Results (primary -0.9%, secondary -0.4%)

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)
1.4% [0.5%, 2.7%] 3
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
-2.3% [-2.4%, -2.3%] 3
All ❌✅ (primary) -0.9% [-0.9%, -0.9%] 1

Cycles

Results (primary 3.5%, secondary 9.4%)

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

mean range count
Regressions ❌
(primary)
3.5% [3.5%, 3.5%] 1
Regressions ❌
(secondary)
17.1% [0.6%, 34.9%] 12
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-3.8%, -0.5%] 8
All ❌✅ (primary) 3.5% [3.5%, 3.5%] 1

Binary size

Results (secondary -0.0%)

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

Bootstrap: 498.18s -> 499.128s (0.19%)
Artifact size: 394.99 MiB -> 395.02 MiB (0.01%)

@jhpratt jhpratt deleted the rollup-xaL6466 branch May 7, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler 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. 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.