Skip to content

Rollup of 9 pull requests#155911

Merged
rust-bors[bot] merged 20 commits intorust-lang:mainfrom
jhpratt:rollup-DOR0YN1
Apr 28, 2026
Merged

Rollup of 9 pull requests#155911
rust-bors[bot] merged 20 commits intorust-lang:mainfrom
jhpratt:rollup-DOR0YN1

Conversation

@jhpratt
Copy link
Copy Markdown
Member

@jhpratt jhpratt commented Apr 28, 2026

Successful merges:

r? @ghost

Create a similar rollup

daltenty and others added 20 commits April 13, 2026 13:17
The bcdtor mode affects how the AIX linker choose to pull in static constructors and destructors (https://www.ibm.com/docs/en/aix/7.2.0?topic=l-ld-command) to the link.

The current setting of all makes static init in archive members live regardless of if the archive member would be otherwise referenced, causing that whole archive member to become part of the link.

This default was initially retained for compatibility purposes with historical compilers on the platform which defaulted to this setting. Unfortunately this greedy pulling in of static init can have unintended consequences for applications, for example for programs linked against parts of compiler-rt which contain optional instrumentation (containing static initializers) which may be unused as these now become live in all programs regardless of use.

For that reason and similar reasons, this PR switches the default to mbr, which only extracts static init from archive members which would otherwise be referenced. This gives a behaviour very consistent with linkers on other platforms (e.g. Linux).

Users requiring the old default behaviour can manually pass -bcdtors:all on the link step which will override any default we pass here.
It results in `b64` having many fewer bits set than it should.

LLM disclosure: this bug was identified by Claude Code. I did everything
else.
It does a masking operation but the mask is computed incorrectly due to
operator precedence. The mask is of the form `1 << N - 1` but it
should be `(1 << N) - 1` because `-` binds tighter than `1 << N`.

This commit fixes the problem, not by adjusting the precedence, but by
instead using the existing `clear_excess_bits_in_final_word`, which is
consistent with other similar operations.

LLM disclosure: this bug was identified by Claude Code. I did everything
else.
Same as in Vec::push_mut, we get `.len()` once at the start since
it won't change in the `reserve()` call.

Saves reloading the length after the allocation: https://godbolt.org/z/W3G165Gd7
This ensures the length calculation will always be self-consistent even if the real length changes when we actually come to use them.
`MpscReceiver` aligns with `MpscSender`.  The original name appears to
not actually have been in use, for better or worse.

Along the way, sprinkle the attribute onto `mpmc::Receiver` and
`mpmc::Sender` too.
…ract, r=Zalathar

Fix a bug in `ChunkedBitSet::subtract`

An operator precedence bug means an incorrect mask is used in `ChunkedBitSet::subtract`. Details in individual commits.

r? @dingxiangfei2009
Don't reload length in String::push

Same as in `Vec::push_mut`, we get `.len()` once at the start since it won't change in the `reserve()` call.

Saves reloading the length after the allocation: https://godbolt.org/z/W3G165Gd7
`slice::join`: borrow only once during length calc

This ensures the length calculation will always be self-consistent even if the real length changes when we actually come to use them.

This is a follow up to rust-lang#155708
…twco

[AIX] update linker default to bcdtors

The bcdtor mode affects how the AIX linker choose to pull in static constructors and destructors (https://www.ibm.com/docs/en/aix/7.2.0?topic=l-ld-command) to the link.

The current setting of all makes static init in archive members live regardless of if the archive member would be otherwise referenced, causing that whole archive member to become part of the link.

This default was initially retained for compatibility purposes with historical compilers on the platform which defaulted to this setting. Unfortunately this greedy pulling in of static init can have unintended consequences for applications, for example for programs linked against parts of compiler-rt which contain optional instrumentation (containing static initializers) which may be unused as these now become live in all programs regardless of use.

For that reason and similar reasons, this PR switches the default to mbr, which only extracts static init from archive members which would otherwise be referenced. This gives a behaviour very consistent with linkers on other platforms (e.g. Linux).

Users requiring the old default behaviour can manually pass `-bcdtors:all` on the link step which will override any default we pass here.

(Note: this mirrors LLVM change: llvm/llvm-project#191265)
…2277, r=petrochenkov

[codex] tests: mark migrated UI tests as check-pass

## Summary

Migrate a small set of UI tests left behind by the `compile-pass` migration from `build-pass` to `check-pass`.

These tests exercise attributes, cfg_attr, range trait type checking, and reachable-code diagnostics. None of the changed tests need codegen or linking, so `check-pass` matches the intended coverage and removes the stale `FIXME(rust-lang#62277)` notes.

## Validation

- `python x.py test tests/ui/attributes/attr-before-view-item.rs tests/ui/attributes/attr-before-view-item2.rs tests/ui/attributes/attr-mix-new.rs tests/ui/attributes/class-attributes-1.rs tests/ui/attributes/class-attributes-2.rs tests/ui/attributes/method-attributes.rs tests/ui/attributes/unrestricted-attribute-tokens.rs tests/ui/attributes/variant-attributes.rs tests/ui/conditional-compilation/cfg-attr-multi-false.rs tests/ui/conditional-compilation/cfg-attr-multi-true.rs tests/ui/range/range_traits-4.rs tests/ui/range/range_traits-5.rs tests/ui/range/range_traits-7.rs tests/ui/reachable/expr_andand.rs tests/ui/reachable/expr_oror.rs`
- `python x.py test tidy`
…r=mejrs

Rename the diagnostic item for `std::sync::mpsc::Receiver`

`MpscReceiver` aligns with `MpscSender`.  The original name appears to not actually have been in use, for better or worse.

r? mejrs
Add regression test for rust-lang#101363

Adds test for rust-lang#101363

Since it's my first time adding tests, I'm not sure if the test itself, its location, or its name are appropriate.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Apr 28, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 28, 2026
@jhpratt
Copy link
Copy Markdown
Member Author

jhpratt commented Apr 28, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 28, 2026

📌 Commit 8759017 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 Apr 28, 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 Apr 28, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 28, 2026

☀️ Test successful - CI
Approved by: jhpratt
Duration: 4h 4m 33s
Pushing 03c609a to main...

@rust-bors rust-bors Bot merged commit 03c609a into rust-lang:main Apr 28, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 28, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#155247 [AIX] update linker default to bcdtors 5668855f5751634db2fbe4b696fc47af4679bdda (link)
#155381 Fix a bug in ChunkedBitSet::subtract 45b98867fa3fa68e07c5becebde07f3308ce47f4 (link)
#155812 [codex] tests: mark migrated UI tests as check-pass 64565d69308dc51515f9e4131a507d6be9f35f4b (link)
#155847 Don't reload length in String::push aedd0b539327579981d3e6abc168fc4d6814ffb8 (link)
#155854 Rename the diagnostic item for std::sync::mpsc::Receiver 9ab0901bee240a1a7325301fab278244e4e03e31 (link)
#155858 slice::join: borrow only once during length calc 5db57c86f2ab7d844fe0f84c253d44bd5555899a (link)
#155879 enable pipe tests in Miri 43c5959f712220136c00a0e38de1f14997069122 (link)
#155882 Add regression test for #101363 ce8c123fe5af2517e0dc2ccf0bdf804a35b2c4ec (link)
#155905 Update LLVM to 22.1.4 (again) 013bfeff93c4374fffb134cc9a2e45c068d7cbc5 (link)

previous master: 4ddb0b7f8e

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@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 4ddb0b7 (parent) -> 03c609a (this PR)

Test differences

Show 234 test diffs

Stage 1

  • str::test_join_inconsistent_borrow: pass -> [missing] (J1)
  • str::test_join_inconsistent_borrow_grow: [missing] -> pass (J1)
  • str::test_join_inconsistent_borrow_shrink: [missing] -> pass (J1)
  • str::test_join_issue_80335: pass -> [missing] (J1)
  • [codegen] tests/codegen-llvm/amdgpu-addrspacecast.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J3)
  • [codegen] tests/codegen-llvm/gpu-launch-sized-workgroup-memory.rs#nvptx-post-llvm-23: ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.4 is older than 23.0.0) (J3)
  • [codegen] tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs#old: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J3)
  • [codegen] tests/codegen-llvm/issues/issue-37945.rs#new: ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.4 is older than 23.0.0) (J3)
  • [codegen] tests/codegen-llvm/issues/matches-logical-or-141497.rs: ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.4 is older than 23.0.0) (J3)
  • [codegen] tests/codegen-llvm/scalable-vectors/debuginfo.rs#PRE-LLVM-22: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J3)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J3)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J3)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J3)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J3)
  • [codegen] tests/codegen-llvm/vec_pop_push_noop.rs#old: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J3)
  • [codegen] tests/codegen-llvm/vecdeque_pop_push.rs#old: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J3)
  • [ui] tests/ui/attributes/class-attributes-1.rs: pass -> [missing] (J5)
  • [ui] tests/ui/attributes/class-attributes-2.rs: pass -> [missing] (J5)
  • [ui] tests/ui/consts/const-eval/static-promotion-issue-101363.rs: [missing] -> pass (J5)

Stage 2

  • [ui] tests/ui/attributes/class-attributes-1.rs: pass -> [missing] (J0)
  • [ui] tests/ui/attributes/class-attributes-2.rs: pass -> [missing] (J0)
  • [ui] tests/ui/consts/const-eval/static-promotion-issue-101363.rs: [missing] -> pass (J0)
  • [codegen] tests/codegen-llvm/amdgpu-addrspacecast.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J2)
  • [codegen] tests/codegen-llvm/gpu-launch-sized-workgroup-memory.rs#nvptx-post-llvm-23: ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.4 is older than 23.0.0) (J2)
  • [codegen] tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs#old: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J2)
  • [codegen] tests/codegen-llvm/issues/issue-37945.rs#new: ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.4 is older than 23.0.0) (J2)
  • [codegen] tests/codegen-llvm/issues/matches-logical-or-141497.rs: ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.4 is older than 23.0.0) (J2)
  • [codegen] tests/codegen-llvm/scalable-vectors/debuginfo.rs#PRE-LLVM-22: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J2)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM21: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J2)
  • [codegen] tests/codegen-llvm/vec_pop_push_noop.rs#old: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J2)
  • [codegen] tests/codegen-llvm/vecdeque_pop_push.rs#old: ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.4) is newer than majorversion 21) (J2)
  • str::test_join_inconsistent_borrow: pass -> [missing] (J4)
  • str::test_join_inconsistent_borrow_grow: [missing] -> pass (J4)
  • str::test_join_inconsistent_borrow_shrink: [missing] -> pass (J4)
  • str::test_join_issue_80335: pass -> [missing] (J4)
  • [codegen] tests/codegen-llvm/array-equality.rs#llvm-next: ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.4 is older than 23.0.0) (J6)
  • [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) (J7)

Additionally, 194 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 03c609abb6638f9d7f49f34326d4137d07f5cd61 --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. x86_64-gnu-distcheck: 1h 47m -> 2h 45m (+54.1%)
  2. pr-check-1: 31m 7s -> 44m 57s (+44.4%)
  3. x86_64-rust-for-linux: 50m 18s -> 1h 11m (+41.7%)
  4. i686-gnu-nopt-1: 1h 46m -> 2h 24m (+36.0%)
  5. armhf-gnu: 1h 26m -> 1h 57m (+34.9%)
  6. x86_64-gnu-tools: 59m 54s -> 1h 18m (+30.5%)
  7. x86_64-gnu-gcc: 1h 4m -> 1h 21m (+27.4%)
  8. pr-check-2: 43m 55s -> 55m 41s (+26.8%)
  9. aarch64-apple: 3h 5m -> 3h 55m (+26.7%)
  10. i686-gnu-1: 1h 49m -> 2h 19m (+26.7%)
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 (03c609a): 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 (primary 1.8%, secondary -1.4%)

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.4%, 4.7%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.7% [-1.7%, -1.7%] 1
Improvements ✅
(secondary)
-1.4% [-1.4%, -1.4%] 1
All ❌✅ (primary) 1.8% [-1.7%, 4.7%] 3

Cycles

Results (secondary -2.7%)

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

Binary size

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

Bootstrap: 489.39s -> 487.089s (-0.47%)
Artifact size: 393.41 MiB -> 393.44 MiB (0.01%)

@jhpratt jhpratt deleted the rollup-DOR0YN1 branch April 28, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-clippy Relevant to the Clippy team. 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.