Skip to content

Rollup of 8 pull requests#158027

Closed
JonathanBrouwer wants to merge 16 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-nUxhyJT
Closed

Rollup of 8 pull requests#158027
JonathanBrouwer wants to merge 16 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-nUxhyJT

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

mu001999 and others added 16 commits June 12, 2026 20:28
LLVM 23 recently changed SimplifyCFG to avoid integer lookup tables, and
that perturbed these two tests in ways that look harmless to me.
When a `for` loop is missing its `in`, the parser suggested inserting one
based only on the token after the pattern. A malformed binding such as
`for i i in 0..10` was therefore "corrected" to `for i in i in 0..10`,
which does not parse. Only suggest inserting `in` when the loop header
does not already contain one before the body.
When passing multiple `-Zsanitizer` flags to the compiler (e.g.,
`-Zsanitizer=address -Zsanitizer=shadow-call-stack`), the options parser
was overwriting the previous values in `target_modifiers` instead of
accumulating them. This resulted in only the last sanitizer being
recorded in the crate metadata's target modifiers, even though the
frontend correctly enabled all of them.

The only way to provide multiple sanitizers was to combine them into a
comma-separated list passed to a single `-Zsanitizer=` flag, but this
does not fit well into the GN build system where different targets may
pass different combinations of sanitizer flags.

Consequently, this caused spurious "incompatible target modifiers"
ABI mismatch errors when linking against dependencies compiled with
accumulated flags (e.g., `-Zsanitizer=address,shadow-call-stack`).

Fix this by entry-modifying the `target_modifiers` map to accumulate
the sanitizers as a comma-separated list when the option is
`sanitizer`.

Also add a codegen test verifying that both CFI and SafeStack
attributes/metadata are present when enabled together via multiple
flags.

Test: ./x.py test tests/codegen-llvm/sanitizer/multiple-sanitizers.rs
… r=petrochenkov

Accumulate multiple -Zsanitizer target modifiers

When passing multiple `-Zsanitizer` flags to the compiler (e.g., `-Zsanitizer=address -Zsanitizer=shadow-call-stack`), the options parser was overwriting the previous values in `target_modifiers` instead of accumulating them. This resulted in only the last sanitizer being recorded in the crate metadata's target modifiers, even though the frontend correctly enabled all of them. The only way to provide multiple sanitizers is to combine them into a comma-separated list passed to a single `-Zsanitizer=` flag, but this doesn't fit very well into the GN build system where different targets may pass different combinations of sanitizer flags.

Consequently, this caused spurious "incompatible target modifiers" ABI mismatch errors when linking against dependencies compiled with accumulated flags.

Fix this by entry-modifying the `target_modifiers` map to accumulate the sanitizers as a comma-separated list when the option is `sanitizer`.
…mfix, r=joboet

Stabilize `strip_circumfix`

Tracking issue: rust-lang#147946
…i865

Query the trait solver in slow path for `missing_debug_implementations`

Fixes rust-lang#157757
Fixes rust-lang#157758
tests: adapt two tests for LLVM 23 changes

LLVM 23 recently changed SimplifyCFG to avoid integer lookup tables, and that perturbed these two tests in ways that look harmless to me.
…estion-103561, r=folkertdev

Don't suggest adding `in` to a `for` loop that already has one

Closes rust-lang#103561.

When a `for` loop is missing its `in`, the parser suggested inserting one based only on the token following the pattern. For a malformed binding such as `for i i in 0..10` it therefore suggested `for i in i in 0..10`, which is itself invalid.

The suggestion is now only emitted when the loop header does not already contain an `in` before the body. The `for x EXPR` / `for x of EXPR` / `for x = EXPR` suggestions are unchanged.
…ble-shim, r=folkertdev

Preserve track_caller for by-value dyn vtable shims

Fixes rust-lang#157964
…, r=petrochenkov

delegation: add simple test for incremental compilation

Progress on incremental lowering (rust-lang#142830) fixed rust-lang#155729 by removing delayed lowering at all.

Fixes rust-lang#155729. Part of rust-lang#118212.
r? @petrochenkov
…ate, r=mejrs

Move `UnusedDuplicate` diag struct to `rustc_attr_parsing`

This was moved there in rust-lang#154432, I am not entirely sure why there? This was probably an oversight, at least I missed this during review

cc @GuillaumeGomez
r? @mejrs
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 17, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) PG-exploit-mitigations Project group: Exploit mitigations 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 17, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never 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,x86_64-mingw-1,i686-msvc-2

@rust-bors

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0df317f 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 Jun 17, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 17, 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
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 17, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #157788 (Accumulate multiple -Zsanitizer target modifiers)
 - #158012 (Stabilize `strip_circumfix`)
 - #157810 (Query the trait solver in slow path for `missing_debug_implementations`)
 - #157829 (tests: adapt two tests for LLVM 23 changes)
 - #157917 (Don't suggest adding `in` to a `for` loop that already has one)
 - #157967 (Preserve track_caller for by-value dyn vtable shims)
 - #158019 (delegation: add simple test for incremental compilation)
 - #158023 (Move `UnusedDuplicate` diag struct to `rustc_attr_parsing`)
@rust-bors

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 4b90300 (4b90300b3c509799167031ad6a854643d6b2caaa)
Base parent: 1162ebd (1162ebd81da49955aa94ef240cf7bb0bafad3f6a)

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-loongarch64-linux failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

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

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

💔 Test for a41e1f6 failed: CI. Failed job:

@jhpratt

jhpratt commented Jun 17, 2026

Copy link
Copy Markdown
Member

@bors retry

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

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) 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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.