Skip to content

Rollup of 12 pull requests - #161352

Closed
JonathanBrouwer wants to merge 30 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-19KL7Yi
Closed

Rollup of 12 pull requests#161352
JonathanBrouwer wants to merge 30 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-19KL7Yi

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

mejrs and others added 30 commits August 5, 2026 19:09
This patch implements Rust's equivalent of Clang's function pointer type
discriminator computation used in pointer authentication. Compatibility
with Clang is a primary goal. The discriminator produced for a given
external "C" function type must match the value computed by Clang so
that function pointers can be exchanged safely between Rust and C code
while preserving pointer authentication semantics.

The implementation mirrors Clang's behavior in
`ASTContext::encodeTypeForFunctionPointerAuth`, ensuring that identical
C-compatible function types produce identical discriminators. See:
<https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3>.
`MCOptions` is the name of the variable commonly used for instances of
`MCTargetOptions`. Use the proper type name instead.
…parent]` is applied

Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
…=davidtwco

[PAC] Encoder and hash (1/8)

This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.

The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.

---

This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](rust-lang#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](rust-lang#159074)
3. [FPTR_TYPE_DISCR in ABI Version](rust-lang#159075)
4. [Static allocs](rust-lang#159081)
5. [Transmutes](rust-lang#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](rust-lang#159084)
7. [Minicore updates to support fn ptr type discriminator tests](rust-lang#159086)
8. [Fn ptr type discrimination tests](rust-lang#159087)

---

Useful links:
* Previous PAC work:
  * `pauthtest` introduction: rust-lang#155722
  * Library support follow up: rust-lang#156548
  * Config follow up: rust-lang#156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
Update the `rustc-perf` submodule

To bring in rust-lang/rustc-perf#2537, so that we unblock rust-lang#160619.

r? lcnr
…t, r=fmease

rustdoc: Always document `#[repr(transparent)]` if `#[rustc_pub_transparent]` is applied

Fixes rust-lang#150919
…r=davidtwco

Add `remove hidden_glob_reexports item breaks downstream` test

Adds the minimization of rust-lang#159901 to the test suite.
…=davidtwco

remove unwrap from write_mir_fn_graphviz
Enhance EII UI tests

The first commit enabled all EII tests on Windows MSVC. Two other PRs were merged almost simultaneously with my previous PR and they kept `ignore-windows` instead of `ignore-windows-gnu`.

The second commit normalized EII dylib test coverage. Previously, there were only two dedicated negative tests and some auxiliary crates that had `no-prefer-dynamic` removed but whose `crate_type` was still `rlib` were accidentally compiled into `dylib`s and thus were tested unintentionally.

This is now normalized: some tests will be tested under two revisions: `rlib` and `dylib` or `dylib-impl` (declaration in `rlib` & implementation in `dylib`).

Note that `call_default_panics.run.stderr` is not updated; the file appears to be invalid, and I am unsure how to update this check.
…dtwco

fix arm homogeneous aggregate ABI

This started with abi-cafe finding a mismatch between rustc and clang/gcc, but turned into quite the rabbit hole of bits of ABI that were never implemented. The code is effectively ported from LLVM, and abi-cafe is happy now.

The bug I hit was that aligned structs were passed incorrectly:

https://godbolt.org/z/jErPoPrv5

The assertions for watchOS are best-effort, I can't actually run that. But, it's tier 3, it was already broken, so at worst it's just less broken now.

The relevant code is in https://github.com/llvm/llvm-project/blob/551766823bb7b5a6af84e4ec1c1aff6dff431229/clang/lib/CodeGen/Targets/ARM.cpp, I'll link some specific parts.

r? davidtwco
Download auto jobs in citool in parallel

To make the post-merge workflow report the result sooner after a PR is merged, and also to make local experiments (also with the test dashboard) quicker.

r? jieyouxu
Reserve capacity for 3% anon nodes

This reserves capacity for 3% anon nodes instead of 100%. For the benchmark suite the mean is ~1.6% and max ~5.8%, so I picked a middle ground.
…JohnTitor

Tighten the language used for documenting `TargetOptions::llvm_abiname`

`MCOptions` is the name of the variable commonly used for instances of `MCTargetOptions`. Use the proper type name instead. It should make finding the [documentation](https://llvm.org/doxygen/classllvm_1_1MCTargetOptions.html) for the struct a bit easier.
Rename `ProjectionPredicate` and `TraitPredicate`

Part of rust-lang#107250

This deviates from the plan I described in rust-lang#107250 (comment). The reason is that I kept getting into the awkward situation where I would go into a function dealing with multiple predicate/clause kinds, and need to rename only the variables referring with the particular kind I was renaming. So now, the plan is to first rename only the types (this PR), and afterwards go into functions and rename all the variables in them at once. That would also allow splitting the work better, e.g. tackling one crate/subtree at a time.

r? @oli-obk
Remove a bunch of unnecessary explicit lifetimes

Both rustdoc and hir ty lowering only process the HIR, they never store any of those nodes anywhere.

The reason I did this is that I'm refactoring `hir::ItemKind::Use`, and for rustdoc's processing of it it is more convenient to create a bunch of values on the stack and reference them, but right now rustdoc was expecting `'tcx` lifetimes everywhere.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 19, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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-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 Aug 19, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

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

@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 45a094d 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 Aug 19, 2026
@rust-bors

This comment has been minimized.

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


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple-1
try-job: aarch64-apple-2
try-job: x86_64-mingw-1
try-job: i686-msvc-1
try-job: i686-msvc-2
@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 19, 2026
@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 7f7f205 (7f7f205648d583979cc485f4ca6b5e4f91ad7d86)
Base parent: f7d782a (f7d782a3be46d6bb4b9792fe69a61db389ba1769)

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-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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-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.