Skip to content

Rollup of 8 pull requests - #164430

Merged
rust-bors[bot] merged 20 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-hGFaI2X
Oct 16, 2026
Merged

rust-bors[bot] merged 20 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-hGFaI2X

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

Suryansh-Dey and others added 20 commits October 13, 2026 10:24
…overflow

Self-referential RTN expands args on each unrolling step, bypassing
the `self.types.insert` cycle check. Track depth against `recursion_limit`
and short-circuit with `ControlFlow::Break` when exceeded so we don't
blow the stack.
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Install LLVM 23 from apt.llvm.org.
…s, r=adwinwhite

handle trait solver overflow in `codegen_select_candidate`

We now report overflow errors in `codegen_select_candidate` instead of failing to resolve instance and ICE.

fixes rust-lang#162343
fixes rust-lang/trait-system-refactor-initiative#306
Fix: Construct byte string valtree array type using literal length

closes rust-lang#163904

## Bug
Mentioned in the issue.

The reason type checking was not catching the `SizeOverflow` before `const` evaluation starts was:
The trait solver just checks that the constant's own type equals the declared type
https://github.com/rust-lang/rust/blob/472684ea0c352dad27153b2a9646b0fcd7c8daf8/compiler/rustc_trait_selection/src/traits/fulfill.rs?plain=1#L582-L595

Hence building the value lead to `Err` value from `layout_of` leading panic in `valtree_to_ref`.
https://github.com/rust-lang/rust/blob/472684ea0c352dad27153b2a9646b0fcd7c8daf8/compiler/rustc_const_eval/src/const_eval/valtrees.rs?plain=1#L395

## Solution
As suggested by @BoxyUwU and @oli-obk
We shouldn't blindly copy the declared type and size! Rather label the value with its real size. Hence now `[u8; 0] != [u8; usize::MAX]`, so the compiler reports normal error.

# How to test
Run `./x test tests/ui/const-generics/mgca --stage 1`
**Manual test** mentioned in the issue
…=oli-obk

refine: respect recursion limit in RPITIT collector to prevent stack overflow

Fixes rust-lang#163866.

Prevents a compiler stack overflow (SIGSEGV) during `refining_impl_trait` checks when an RPITIT return type references its own RTN projection:

    trait IntFactory {
        fn stream(&self) -> impl IntFactory<stream(..): Send>;
    }

    impl IntFactory for S {
        fn stream(&self) -> impl IntFactory<stream(..): Send> {
            todo!()
        }
    }

### Cause

`ImplTraitInTraitCollector` was detecting cycles using `self.types.insert(proj)`. Because `proj` is an alias projection type that includes generic substitutions, self-referential RTN expands deeper generic arguments on each unrolling step:

- `stream::{opaque#0}<S>`
- `stream::{opaque#0}<<S as IntFactory>::stream::{opaque#0}>>`
- `stream::{opaque#0}<<<S as IntFactory>::stream::{opaque#0} as IntFactory>::stream::{opaque#0}>>>`

Since generic args change on every step, `proj` never compares equal to any previously visited item, causing the visitor to loop infinitely until stack exhaustion.

### Fix

Instead of outright banning seen `DefId`s (which would cut off valid finitely unrolling types), track the unrolling depth against `tcx.recursion_limit()`.

When depth hits the recursion limit, the visitor now short-circuits immediately via `ControlFlow::Break(())` and `?`. This avoids exploring an exponential branching tree when multiple self-referential bounds exist, cleanly terminating the refine check.

Added UI regression test in `tests/ui/impl-trait/in-trait/refine-self-referential-rtn.rs`.
…cope-of-object, r=GuillaumeGomez

Make the `documentation` scope a sub-scope of the `object` scope

~~First commit from rust-lang#164278.~~

This PR moves the `documentation` scope to be a sub-scope of the `object` scope.

The `object` scope is currently defined to be: "This ensures all paths in compiled executables, libraries and objects outputs are remapped but not elsewhere", which can be translated to mean everything written to disk by `rustc` it-self.

It is therefore a natural extension for the `documentation` scope to be a sub-scope of it, like `macro`, `debuginfo` and `coverage`, since we use it for things written down on disk, like rustdoc-json (with rust-lang#164278 at-least) or the source code viewer.
Update LoongArch64 Linux dist builder to LLVM 23

This is also a defensive fix, as certain linker inputs can trigger an ["address assignment did not converge"](llvm/llvm-project#226712) error during linker relaxation in LLD versions prior to 23.1.3, causing the link to fail.
…smutability, r=ShoyuVanilla

Avoid erased region on transmutability

It seems like the erasure of regions here wasn't needed anymore since all tests pass and removing it makes the next-solver looses it's lifetime extensions powers.

Fixed the last test in rust-lang/trait-system-refactor-initiative#152

Closes rust-lang#164246

[discussed in zulip](https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/next.20solver.20and.20the.20philosopher.20stone/with/631772202)

r? @lcnr
…v-libc, r=jieyouxu

cargotest: update xsv libc for RISC-V

Fixes rust-lang#164339.

The xsv repository pinned by `cargotest` has a lockfile from 2018 that uses
`libc 0.2.43`. That version fails to compile on RISC-V because it does not
define `c_char` for the target. Add a `cargotest` lockfile for xsv with only
`libc` updated to `0.2.190` and use the existing lockfile override mechanism.

This keeps xsv and its other dependencies at their current pinned versions.

Tests:

- `cargo update -p libc --precise 0.2.190` in the pinned xsv checkout
- `cargo check --target riscv64gc-unknown-linux-gnu --tests` in xsv
- `cargotest <cargo> <out-dir> xsv` (394 selected tests passed on x86_64)

The full test suite has not been run on RISC-V hardware.
…rame-init-hook, r=RalfJung

Implement after-stack-frame-init-hook

Adds a new hook to `compiler/rustc_const_eval/src/interpret/machine.rs` that gets called immediately after a stack frame's function arguments are fully initialized.

r?<@RalfJung>
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 16, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-run-make Area: port run-make Makefiles to rmake.rs A-rustdoc-json Area: Rustdoc JSON backend 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-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-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 Oct 16, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,test-x86_64-gnu-aux,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu,test-x86_64-gnu-llvm-22-3

@rust-bors

rust-bors Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5006510 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 Oct 16, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 16, 2026
Rollup of 8 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
try-job: test-x86_64-gnu-llvm-22-3
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 60a2020 (60a2020ce88208b0b625ce8f195dbffa647c083d)
Base parent: bf9448e (bf9448e42622eaba63ebc171bb4584cea22210b4)

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

rust-bors Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 5h 45m 35s
Pushing 5d8fec0 to main...

@rust-bors
rust-bors Bot merged commit 5d8fec0 into rust-lang:main Oct 16, 2026
16 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 16, 2026
@github-actions

Copy link
Copy Markdown
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 bf9448e (parent) -> 5d8fec0 (this PR)

Test differences

Show 46 test diffs

Stage 1

  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-131342.rs: pass -> [missing] (J0)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-131342.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-131342.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-92004.rs: pass -> [missing] (J0)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-92004.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-92004.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/byte-str-len-mismatch-ice-163904.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-trait/in-trait/refine-self-referential-rtn.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/corecursive-trait-solver-issue-162343.rs: [missing] -> pass (J0)
  • [ui] tests/ui/transmutability/references/lifetime-extension.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/transmutability/references/lifetime-extension.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/transmutability/references/reject_lifetime_extension.rs: pass -> [missing] (J0)
  • [ui] tests/ui/transmutability/references/reject_lifetime_extension.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/transmutability/references/reject_lifetime_extension.rs#old: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/codegen/normalization-overflow/recursion-issue-131342.rs: pass -> [missing] (J2)
  • [ui (polonius)] tests/ui/codegen/normalization-overflow/recursion-issue-131342.rs#current: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/codegen/normalization-overflow/recursion-issue-131342.rs#next: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/codegen/normalization-overflow/recursion-issue-92004.rs: pass -> [missing] (J2)
  • [ui (polonius)] tests/ui/codegen/normalization-overflow/recursion-issue-92004.rs#current: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/codegen/normalization-overflow/recursion-issue-92004.rs#next: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/const-generics/mgca/byte-str-len-mismatch-ice-163904.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/impl-trait/in-trait/refine-self-referential-rtn.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/traits/next-solver/corecursive-trait-solver-issue-162343.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/transmutability/references/lifetime-extension.rs#current: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/transmutability/references/lifetime-extension.rs#next: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/transmutability/references/reject_lifetime_extension.rs: pass -> [missing] (J2)
  • [ui (polonius)] tests/ui/transmutability/references/reject_lifetime_extension.rs#next: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/transmutability/references/reject_lifetime_extension.rs#old: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-131342.rs: pass -> [missing] (J1)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-131342.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-131342.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-92004.rs: pass -> [missing] (J1)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-92004.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/codegen/normalization-overflow/recursion-issue-92004.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/mgca/byte-str-len-mismatch-ice-163904.rs: [missing] -> pass (J1)
  • [ui] tests/ui/impl-trait/in-trait/refine-self-referential-rtn.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/corecursive-trait-solver-issue-162343.rs: [missing] -> pass (J1)
  • [ui] tests/ui/transmutability/references/lifetime-extension.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/transmutability/references/lifetime-extension.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/transmutability/references/reject_lifetime_extension.rs: pass -> [missing] (J1)
  • [ui] tests/ui/transmutability/references/reject_lifetime_extension.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/transmutability/references/reject_lifetime_extension.rs#old: [missing] -> pass (J1)
  • [rustdoc-json] tests/rustdoc-json/remap-path-prefix/object.rs: pass -> ignore (ignored when the operating system is windows) (J3)

Additionally, 3 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 5d8fec0669a64607db9ccbf663e7c23125bf4748 --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-loongarch64-musl: 1h 27m -> 5h 40m (+291.1%)
  2. dist-loongarch64-linux: 2h 7m -> 5h 44m (+170.0%)
  3. test-x86_64-gnu-gcc-core-tests: 9m 34s -> 19m 29s (+103.7%)
  4. test-x86_64-gnu-parallel-frontend: 1h 12m -> 2h 3m (+69.9%)
  5. optional-test-x86_64-gnu-autodiff: 34m 28s -> 58m 33s (+69.9%)
  6. dist-x86_64-mingw: 1h 44m -> 2h 51m (+63.6%)
  7. dist-x86_64-illumos: 1h 13m -> 1h 55m (+57.2%)
  8. test-x86_64-rust-for-linux: 36m 24s -> 57m 13s (+57.2%)
  9. test-arm-android: 1h 13m -> 1h 53m (+54.8%)
  10. dist-armv7-linux: 1h 4m -> 1h 36m (+49.4%)
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

Finished benchmarking commit (5d8fec0): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

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

Cycles

Results (secondary -2.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)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 488.875s -> 490.438s (0.32%)
Artifact size: 407.06 MiB -> 406.97 MiB (-0.02%)

@rust-bors

rust-bors Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#162467 handle trait solver overflow in codegen_select_candidate 63a228af1c6b6a9be757d42b561e1c4fcad06e67
(link)
#164111 Fix: Construct byte string valtree array type using literal… af734a948aab9e60c6033f0ec065142f05d5892a
(link)
#164227 refine: respect recursion limit in RPITIT collector to prev… 4d6ee9d7aeefacd4214b763e8a02781153a9ebe7
(link)
#164279 Make the documentation scope a sub-scope of the object … 70e1c2834e478de27f8e30379c43c4a69500855e
(link)
#164353 Update LoongArch64 Linux dist builder to LLVM 23 9ce5b54457286e4b8452215ed486ceea094c0892
(link)
#164365 Avoid erased region on transmutability 6f523b3e2a301ebd4523ab1e8e4268df4e1fd3f7
(link)
#164419 cargotest: update xsv libc for RISC-V 999ed3097f2f378ba71a77b922a1ad8f051aa80c
(link)
#164422 Implement after-stack-frame-init-hook 0400c4a80c8cd18ee56c03e9e0014eced203a805
(link)

parent commit: bf9448e426

In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: @rust-timer triage $SHA $SHA $SHA..., or run @rust-timer triage all to benchmark all rollup members.

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

Labels

A-CI Area: Our Github Actions CI A-run-make Area: port run-make Makefiles to rmake.rs A-rustdoc-json Area: Rustdoc JSON backend 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-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-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