Rollup of 8 pull requests#158414
Closed
JonathanBrouwer wants to merge 20 commits into
Closed
Conversation
Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
…lign-157750, r=cuviper Update LLVM for Mach-O __LINKEDIT alignment fix. Update LLVM submodule to pull in changes from rust-lang/llvm-project#198. Fixes rust-lang#157750. This backport has been discussed in: [#t-compiler > Backport LLVM change to Rust for macOS 27 support?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Backport.20LLVM.20change.20to.20Rust.20for.20macOS.2027.20support.3F/with/605925959).
…avidtwco,RalfJung cmse: clear padding when crossing the secure boundary tracking issue: rust-lang#81391 tracking issue: rust-lang#75835 RFC: rust-lang/rfcs#3884 related: rust-lang#147697 quick context: cmse creates a distinction between code running in secure mode and non-secure mode (think kernel space versus user space). Secure mode has access to data (e.g. encryption keys) that must not leak to non-secure mode. They use a special calling convention that clears unused registers, but padding in arguments/return values can contain stale secure data. This PR clears the padding bytes (and similar, e.g. space not used in any variant of a union/enum) when values are passed over the secure boundary. Separately we'll have a lint to warn on enums and unions being passed across the boundary: for them we can't statically know whether the variant that is passed contains padding. This is conceptually modeled after a similar feature in `clang` ([implementation](https://github.com/llvm/llvm-project/blob/065a39b9f7f06fca0926394096ee1c1fac41d446/clang/lib/CodeGen/CGCall.cpp#L4041-L4087)). cc @Jules-Bertholet r? @davidtwco
…ase, r=petrochenkov fix(tests): allow either branch direction in ilog_known_base Fixes rust-lang#158339. `tests/codegen-llvm/ilog_known_base.rs` checks that `checked_ilog` with a known power-of-two base is lowered through the faster `llvm.ctlz` path. On `riscv64gc-unknown-linux-gnu`, LLVM emits the zero check with the opposite branch direction (`icmp eq i32 %val, 0`) from what the test currently expects (`icmp ne i32 %val, 0`). Both forms still guard the same `llvm.ctlz` fast path, so this relaxes the FileCheck pattern to accept either comparison direction. This also fixes the `checked_ilog16` FileCheck variable to use the `DIV4` result it just matched. Tested: ```sh ./x test --stage 2 tests/codegen-llvm/ilog_known_base.rs ```
LLVM 23: Adapt codegen test to moved assume I wasn't completely sure what the important part of this test is - based on the "Make sure we don't create `br` or `select` instructions" comment I assume it's that the `load` is followed ~immediately by the `ret`, and that the presence or absence of the `assume` doesn't really matter (it's been moved up a few lines to before the `load`): ```ll ; Function Attrs define noundef i32 @foo(ptr noalias nofree noundef align 8 captures(none) dereferenceable(16) %x) unnamed_addr #0 { start %_6 = load ptr, ptr %x, align 8, !nonnull !4, !noundef !4 %0 = getelementptr inbounds nuw i8, ptr %x, i64 8 %_7 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %_8 = icmp ne ptr %_6, %_7 tail call void @llvm.assume(i1 %_8) %_14 = getelementptr inbounds nuw i8, ptr %_6, i64 4 store ptr %_14, ptr %x, align 8 %_4 = load i32, ptr %_6, align 4, !noundef !4 ret i32 %_4 } ``` @rustbot label llvm-main [original CI failure](https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/46608/list?sid=019ed950-c81f-466d-a3bc-2064e6a26719&tab=output)
… r=mejrs Move part of the target checking for `#[may_dangle]` to the parser Work towards removing the ALL_TARGETS list. Only one remaining after this! r? @mejrs
…henkov Fix invalid E0609 raw pointer deref suggestion inside macros Fixes rust-lang#158158 `suggest_first_deref_field` blindly applied span math (`shrink_to_lo()`, `between()`) to generate a dereference suggestion for E0609. When the base expression and field access originate from different macro expansions, the `SyntaxContext` mismatch caused the span combinations to fail. This resulted in the compiler falling back to incorrect source locations and generating malformed replacement strings like `&mut (*).`. * Added a `span.from_expansion()` guard at the top of `suggest_first_deref_field` to check both `base.span` and `field.span`. * Suppressed the multipart suggestion entirely when inside macro expansions to prevent emitting broken syntax, bypassing complex and unreliable cross-macro span traversals. * Added a new UI test to ensure the standard E0609 error is emitted cleanly without the garbled `help:` label.
…enerics-2, r=petrochenkov delegation: add tests for defaults and infers in generics This PR adds tests for interaction of default generic params and infers in delegation. Moreover, it groups delegation's pretty tests into a single folder and adds one test for generics. Comments in tests explain the behavior. Part of rust-lang#118212. r? @petrochenkov
…trochenkov Generate synthetic generic args only for delegation's child segment Fixes rust-lang#158152 by generating synthetic generic args only for delegation's child segment. r? @petrochenkov cc @fmease
Contributor
Author
|
@bors r+ rollup=never p=1 |
Contributor
Contributor
Author
|
Trying commonly failed jobs |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jun 25, 2026
Rollup of 8 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 try-job: x86_64-mingw-1 try-job: i686-msvc-2
Contributor
Author
Contributor
|
Tree closed for PRs with priority less than 4. |
This was referenced Jun 25, 2026
Member
|
nothing but rollupable PRs in the queue now; created a larger rollup to encompass the remaining ones |
Contributor
|
This pull request was unapproved due to being closed. |
Contributor
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
#[may_dangle]to the parser #158261 (Move part of the target checking for#[may_dangle]to the parser)r? @ghost
Create a similar rollup