Skip to content

Rollup of 7 pull requests - #164230

Merged
rust-bors[bot] merged 23 commits into
rust-lang:mainfrom
jhpratt:rollup-nYrhFxL
Oct 13, 2026
Merged

rust-bors[bot] merged 23 commits into
rust-lang:mainfrom
jhpratt:rollup-nYrhFxL

Conversation

@jhpratt

@jhpratt jhpratt commented Oct 12, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

Gelbpunkt and others added 23 commits October 11, 2026 00:26
This test assumes that dlclose runs the destructors of thread locals and
is more than the no-op implementation that musl provides. There is not a
lot of value in this test on musl hosts, so ignoring it seems
appropriate to me.

See
https://wiki.musl-libc.org/functional-differences-from-glibc.html#Unloading-libraries
for more details on dlclose in musl.
Modify `on_unimplemented` attribute wording for `Fn*` traits.
```
error[E0277]: expected `Fn(<_ as ATC<'a>>::Type)` signature, found `F`
  --> $DIR/issue-62529-3.rs:25:14
   |
LL |         call(f, ());
   |         ---- ^ expected `Fn(<_ as ATC<'a>>::Type)` signature, found `F`
   |         |
   |         required by a bound introduced by this call
   |
   = note:        expected type with signature `for<'a> fn(<_ as ATC<'a>>::Type)`
           found type parameter with signature `fn(())`
note: required by a bound in `call`
  --> $DIR/issue-62529-3.rs:9:36
   |
LL | fn call<'b, T: for<'a> ATC<'a>, F: for<'a> Fn(<T as ATC<'a>>::Type)>(
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call`
```
…the size of `AttributeKind`

- Add ui test for #[rustc_assert_variance]
…rameters instead of their parent ADTs

- Add support for bivariance to rustc_assert_variance
- Update rustc_assert_variance ui test accordingly and add case for const generic params
- Minor diagnostic message fix
…r types, cell types, sync lock and guard types, Arc, Rc, Unique, Box, and NonNull
Extract the rpath logic shared by `Llvm`, `Lld` and `OmpOffload` into `llvm_lib_rpath`.
…ause-162776, r=aerooneqq

validate generic parameter remapping in delegation

tracking issue: rust-lang#118212
fixes rust-lang#162776
fixes rust-lang#163868

validate generic parameter remapping before inheriting delegated signatures and predicates. ensure each remapped parameter points to an in-range argument of the same kind: type, lifetime, or const.

use `FallibleTypeFolder` to detect invalid mappings and recover with diagnostics.
preserve const parameter type clauses during predicate recovery.

+regression test for rust-lang#162776 issue and rust-lang#163868

r? compiler
…, r=Kobzol

bootstrap: add an rpath to LLVM library for LLVM tools

Closes [rust-lang#164063](rust-lang#164063) by adding rpath to the LLVM tool executables on both Linux and macOS, using the same approach as Lld::run.

This PR is now written by a human, resubmitting [rust-lang#164064](rust-lang#164064) which was diagnosed and written by Claude.

**Validation:**

macOS
```bash
❯ otool -l ~/workspace/repos/rust/build/aarch64-apple-darwin/llvm/bin/llvm-objcopy | grep -A2 LC_RPATH
          cmd LC_RPATH
      cmdsize 40
         path @loader_path/../../../ (offset 12)
--
          cmd LC_RPATH
      cmdsize 32
         path @loader_path/../lib (offset 12)

❯ otool -L build/aarch64-apple-darwin/llvm/lib/libLLVM.dylib
build/aarch64-apple-darwin/llvm/lib/libLLVM.dylib:
        @rpath/libLLVM.dylib (compatibility version 1.0.0, current version 23.1.3)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1359.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.12)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 2200.27.0)
```

linux
```bash
readelf -d build/x86_64-unknown-linux-gnu/llvm/bin/llvm-objcopy | grep RUNPATH
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../../../:$ORIGIN/../lib:$ORIGIN/../lib/x86_64-unknown-linux-gnu]
```
Tweak wording of "expected/found signature" errors

Do not incorrectly state that we expected a closure when we expected *anything* that conforms to an `Fn*` trait.
…tr, r=mejrs

Add internal #[rustc_assert_variance] attribute for use in std

Add a new attribute `#[rustc_assert_variance]` to ensure the variance of a generic parameter of an algebraic data type at compile time.

The attribute attaches directly to generic parameters of an ADT declaration, and will cause a compile error if the variance of the type does not match what is stated. For example:

```rust
struct Foo<#[rustc_assert_variance(covariant)] 'a, #[rustc_assert_variance(covariant)] T> {
    val: &'a mut T,
}
```

Trying to compile this struct definition gives this error:

```
error: `Foo` is expected to be covariant in `T` but is not
 --> src/main.rs:3:1
  |
3 | pub struct Foo<#[rustc_assert_variance(covariant)] 'a, #[rustc_assert_variance(covariant)] T> {
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^
  |                                                                                            |
  |                                                                                            `Foo` is invariant in `T`
  |
note: required by this attribute
 --> src/main.rs:3:56
  |
3 | pub struct Foo<#[rustc_assert_variance(covariant)] 'a, #[rustc_assert_variance(covariant)] T> {
  |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

The goal is for this to help prevent regression in the variance of standard library types leading to accidental breaking changes in the API. This PR adds this attribute to the definitions of many std wrapper types to this end.

Closes rust-lang#163513

r? mejrs
…usl, r=folkertdev

tests: Ignore dynamic-loading-cdylib on musl hosts

This test assumes that dlclose runs the destructors of thread locals and is more than the no-op implementation that musl provides. There is not a lot of value in this test on musl hosts, so ignoring it seems appropriate to me.

See https://wiki.musl-libc.org/functional-differences-from-glibc.html#Unloading-libraries for more details on dlclose in musl.
…tests, r=Urgau

More `tests/rustdoc-html` cleanups

Another cleanup. :)

r? @Urgau
…-in-binary, r=Urgau

tests: cover `dead_code_pub_in_binary` expectations with `--test`

tracking issue: rust-lang#159078

add ui tests covering `#![expect(dead_code_pub_in_binary)]` across library and binary crates, with and without `--test`, including test builds without an explicit crate type.

the library `--test` case documents the current behavior where the lint expectation is fulfilled despite `--crate-type=lib`, with a `FIXME` for follow-up work.

**test-only change; no lint behavior is modified.**

r? @Urgau
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 12, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs 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-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. labels Oct 12, 2026
@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Oct 12, 2026
@jhpratt

jhpratt commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ca5e8ae 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 Oct 12, 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 Oct 13, 2026
@rust-bors

rust-bors Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 9m 6s
Pushing 88d9824 to main...

@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 e9bbadf (parent) -> 88d9824 (this PR)

Test differences

Show 308 test diffs

Stage 1

  • [ui (polonius)] tests/ui/attributes/rustc_assert_variance.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/delegation/generics/const-param-trait-name-collision-ice-163868.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/delegation/generics/const-param-type-name-collision-ice-162776.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/lint/dead-code-pub-in-binary/binary-normal.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/lint/dead-code-pub-in-binary/binary-test.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/lint/dead-code-pub-in-binary/library-normal.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/lint/dead-code-pub-in-binary/library-test.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/lint/dead-code-pub-in-binary/test-no-crate-type.rs: [missing] -> pass (J1)
  • [rustdoc-html] tests/rustdoc-html/const-fn-76501.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/const-fn-effects.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/const-fn.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/cross-crate-links.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/display/repr.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/display/test-parens.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/empty-tuple-struct-118180.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/fn-bound.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/fn-pointer-arg-name.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/fn-type.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/fn/const-fn-76501.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/fn/const-fn-effects.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/fn/const-fn.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/fn/fn-bound.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/fn/fn-pointer-arg-name.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/fn/fn-type.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate-links.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/repr.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/struct/empty-tuple-struct-118180.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/struct/tuple-struct-fields-doc.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/struct/tuple-struct-where-clause-34928.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/test-parens.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/tuple-struct-fields-doc.rs: pass -> [missing] (J2)
  • [rustdoc-html] tests/rustdoc-html/tuple-struct-where-clause-34928.rs: pass -> [missing] (J2)
  • [ui] tests/ui/attributes/rustc_assert_variance.rs: [missing] -> pass (J3)
  • [ui] tests/ui/delegation/generics/const-param-trait-name-collision-ice-163868.rs: [missing] -> pass (J3)
  • [ui] tests/ui/delegation/generics/const-param-type-name-collision-ice-162776.rs: [missing] -> pass (J3)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/binary-normal.rs: [missing] -> pass (J3)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/binary-test.rs: [missing] -> pass (J3)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/library-normal.rs: [missing] -> pass (J3)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/library-test.rs: [missing] -> pass (J3)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/test-no-crate-type.rs: [missing] -> pass (J3)

Stage 2

  • [rustdoc-html] tests/rustdoc-html/const-fn-76501.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/const-fn-effects.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/const-fn.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/cross-crate-links.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/display/repr.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/display/test-parens.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/empty-tuple-struct-118180.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/fn-bound.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/fn-pointer-arg-name.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/fn-type.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/fn/const-fn-76501.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/fn/const-fn-effects.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/fn/const-fn.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/fn/fn-bound.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/fn/fn-pointer-arg-name.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/fn/fn-type.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/intra-doc/cross-crate-links.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/repr.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/struct/empty-tuple-struct-118180.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/struct/tuple-struct-fields-doc.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/struct/tuple-struct-where-clause-34928.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/test-parens.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/tuple-struct-fields-doc.rs: pass -> [missing] (J0)
  • [rustdoc-html] tests/rustdoc-html/tuple-struct-where-clause-34928.rs: pass -> [missing] (J0)
  • [run-make] tests/run-make/compressed-debuginfo-zstd: pass -> ignore (ignored if LLVM wasn't build with zstd for ELF section compression or LLVM is not the default codegen backend) (J4)
  • [ui] tests/ui/attributes/rustc_assert_variance.rs: [missing] -> pass (J5)
  • [ui] tests/ui/delegation/generics/const-param-trait-name-collision-ice-163868.rs: [missing] -> pass (J5)
  • [ui] tests/ui/delegation/generics/const-param-type-name-collision-ice-162776.rs: [missing] -> pass (J5)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/binary-normal.rs: [missing] -> pass (J5)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/binary-test.rs: [missing] -> pass (J5)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/library-normal.rs: [missing] -> pass (J5)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/library-test.rs: [missing] -> pass (J5)
  • [ui] tests/ui/lint/dead-code-pub-in-binary/test-no-crate-type.rs: [missing] -> pass (J5)
  • [run-make] tests/run-make/dynamic-loading-cdylib: ignore (ignored when cross-compiling) -> ignore (ignored when the target environment is musl) (J6)

Additionally, 234 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 88d982422ac482951195284e27f5bcb0d28f298b --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. test-x86_64-gnu-gcc-core-tests: 12m 53s -> 30m 39s (+137.9%)
  2. test-x86_64-rust-for-linux: 35m 29s -> 1h 18m (+122.5%)
  3. test-pr-check-2: 26m 4s -> 53m 40s (+105.9%)
  4. test-pr-check-1: 32m 9s -> 53m 59s (+67.9%)
  5. test-x86_64-mingw-2: 1h 45m -> 2h 49m (+59.8%)
  6. dist-loongarch64-musl: 1h 20m -> 2h 3m (+53.9%)
  7. dist-i686-msvc: 32m 59s -> 50m 37s (+53.5%)
  8. test-x86_64-gnu-gcc: 1h 6m -> 1h 40m (+50.5%)
  9. test-x86_64-gnu-distcheck: 1h 49m -> 2h 42m (+48.1%)
  10. test-x86_64-gnu-llvm-22-1: 50m 42s -> 1h 14m (+47.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
Copy Markdown
Collaborator

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

Max RSS (memory usage)

Results (primary 1.2%, secondary 1.3%)

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

mean range count
Regressions ❌
(primary)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
2.8% [2.0%, 3.9%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 1

Cycles

Results (primary 3.5%, 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)
3.5% [2.7%, 3.9%] 6
Regressions ❌
(secondary)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) 3.5% [2.7%, 3.9%] 6

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

Bootstrap: 490.497s -> 512.754s (4.54%)
Artifact size: 406.75 MiB -> 406.91 MiB (0.04%)

@rust-bors

rust-bors Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#163798 validate generic parameter remapping in delegation 289323a451329a8643757862668739404dda6132
(link)
#164134 bootstrap: add an rpath to LLVM library for LLVM tools 9c3b9d7b389d48c7cc9ef4da076aefaa7a05e58c
(link)
#164190 Tweak wording of "expected/found signature" errors cb66c317cd7a77e80c9ebe65e79593cfa846e25b
(link)
#163578 Add internal #[rustc_assert_variance] attribute for use in … 034cb0de561bffc43f4f50c1dae653d53f10d3ca
(link)
#164126 tests: Ignore dynamic-loading-cdylib on musl hosts c7e67e425af7f48adb198623eca20b8c47c0d870
(link)
#164171 More tests/rustdoc-html cleanups 30f45ad33506e0e89817a29577131e39e2344092
(link)
#164221 tests: cover dead_code_pub_in_binary expectations with `-… bd145ce9be5f28bb0f7dcaf105f300a296d170d9
(link)

parent commit: e9bbadf682

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-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. 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.

9 participants