Skip to content

Rollup of 15 pull requests#154985

Merged
rust-bors[bot] merged 93 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-a467ECK
Apr 8, 2026
Merged

Rollup of 15 pull requests#154985
rust-bors[bot] merged 93 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-a467ECK

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

Randl and others added 30 commits January 31, 2026 11:44
On targets with convergent operations, we need to add the convergent
attribute to all functions that run convergent operations. Following
clang, we can conservatively apply the attribute to all functions when
compiling for such a target and rely on LLVM optimizing away the
attribute in cases where it is not necessary.

This affects the amdgpu and nvptx targets.
- Specifically guide new contributors that unit tests for `core` and `alloc` do not belong within those crates and instead belong in the `coretests` and `alloctests` crates.
- Also add some information about which `lib.rs` file needs the unstable feature declarations
Update information about adding unit tests
Add explanation of default flags for UI tests
add chapter on projection vs trait split
Explain how nested generic args are represented
projection vs trait bound split cleanup
Change `ConstValue::ByRef` to `ConstValue::Indirect`
…next-solver, r=TaKO8Ki

Fix ICE in next-solver dyn-compatibility check

The next solver treated error-containing dispatchability goals as proven and misclassified the trait as dyn compatible. Short-circuit receivers with type errors so object-method confirmation stays on the normal error path.

Tracking issue: rust-lang#130516
Closes: rust-lang#151311
…r=Nadrieril

Add getters for `rustc_pattern_analysis::constructor::Slice` fields

rust-analyzer needs that.

r? @Nadrieril
match exhaustiveness: Show the guard exhaustivity note only when it's the guards alone that cause non-exhaustiveness

Only show the "match arms with guards don't count towards exhaustivity" note when removing all guards would make the match exhaustive, but also in the cases when the match contains arms without guards. Previously, this note was shown only if all arms had guards, but even if the patterns themselves were insufficient to cover all valid values of a type.

Do this by rerunning the exhaustiveness analysis with guards stripped to determine whether the guards are actually the cause of non-exhaustiveness. This only happens on an actual exhaustiveness error, so should not be a performance concern.

This will make a program like:

```rust
fn main() {
    let some_condition = true;
    let some_option: Option<u8> = None;

    let _res = match some_option {
        Some(val) if some_condition => val,
        None => 0,
    };
}
```

produce the note ”match arms with guards don't count towards exhaustivity” that previously would not have been appearing.

Closes rust-lang#104653 as I think this addresses the spirit of that issue. I don’t believe it’s necessary to be any more elaborate in the diagnostics here?
Use derived impl for `GappedRange` subdiagnostic
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to rust-lang/rustc-dev-guide@912f6c6.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Apr 8, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustc-dev-guide Area: rustc-dev-guide 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 Apr 8, 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

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 8, 2026

📌 Commit aa6dfed 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 Apr 8, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Apr 8, 2026
Rollup of 15 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
@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 8, 2026

☀️ Try build successful (CI)
Build commit: 3036966 (30369661650fce07e6551f6b14aebb3a93e09203, parent: c753cef0df1af7b72ce375fb7c9fd4fc31bfb9ec)

@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 8, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 8, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 23m 45s
Pushing c771f6e to main...

@rust-bors rust-bors bot merged commit c771f6e into rust-lang:main Apr 8, 2026
13 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

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 e26dedc (parent) -> c771f6e (this PR)

Test differences

Show 255 test diffs

Stage 0

  • source_map::tests::test_span_followed_by_skips_whitespace: [missing] -> pass (J2)
  • source_map::tests::test_span_followed_by_stops_at_end_of_file: [missing] -> pass (J2)

Stage 1

  • source_map::tests::test_span_followed_by_skips_whitespace: [missing] -> pass (J0)
  • source_map::tests::test_span_followed_by_stops_at_end_of_file: [missing] -> pass (J0)
  • [ui] tests/ui/asm/s390x/bad-reg.rs#s390x_vector_stable: pass -> [missing] (J2)
  • [ui] tests/ui/borrowck/assign-op-invariance-lifetime.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/borrow-in-match-with-format-string.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/borrowed-mut-pointer-assign-overflow-off.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/borrowed-mut-pointer-assign-overflow-on.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/call-and-ref-option-mutate.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/cannot-assign-borrowed-ref-in-slice.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/cannot-borrow-index-of-hashmap-in-for.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/cannot-move-out-of-borrowed-ref-closure.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/cannot-return-ref-to-temporary-format-args.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/deref-and-mut-borrow-conflict.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/fnmut-borrow-error-in-closure-match.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/immutable-borrow-prevents-mut-method.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/mut-borrow-conflict-in-closures-vec.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/reborrow-in-loop-match-recursive-enum.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/reborrow-in-match-ref-mut-option.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/struct-field-move-with-drop-borrow.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/tuple-field-move-with-drop-borrow.rs: [missing] -> pass (J2)
  • [ui] tests/ui/borrowck/use-moved-value-in-match-guard-drop.rs: [missing] -> pass (J2)
  • [ui] tests/ui/dyn-compatibility/unsafe-binders-bare-trait-object-next-solver.rs: [missing] -> pass (J2)
  • [ui] tests/ui/error-codes/E0423-struct-literal-comment.rs: [missing] -> pass (J2)
  • [ui] tests/ui/field_representing_types/invariant.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/field_representing_types/invariant.rs#old: [missing] -> pass (J2)
  • [ui] tests/ui/issues/issue-18566.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-18783.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-21400.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-25579.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-26619.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-27592.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-28839.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-29053.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-29723.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-40288.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-41498.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-41726.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-4335.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-44405.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-45697-1.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-45697.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-47703-1.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-47703.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-52126-assign-op-invariance.rs: pass -> [missing] (J2)
  • [ui] tests/ui/never_type/regress/builtin_derives_on_adts_with_never.rs: [missing] -> pass (J2)
  • [ui] tests/ui/privacy/private-fields-diagnostic-issue-151408.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/gpu-convergent.rs#amdgpu: [missing] -> pass (J4)
  • [codegen] tests/codegen-llvm/gpu-convergent.rs#nvptx: [missing] -> pass (J4)

Stage 2

  • [ui] tests/ui/borrowck/assign-op-invariance-lifetime.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/borrow-in-match-with-format-string.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/borrowed-mut-pointer-assign-overflow-off.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/borrowed-mut-pointer-assign-overflow-on.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/call-and-ref-option-mutate.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/cannot-assign-borrowed-ref-in-slice.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/cannot-borrow-index-of-hashmap-in-for.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/cannot-borrow-index-output-mutably.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/cannot-move-out-of-borrowed-ref-closure.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/cannot-return-ref-to-fn-param-in-filter-map.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/cannot-return-ref-to-temporary-format-args.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/deref-and-mut-borrow-conflict.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/mut-borrow-conflict-in-closures-vec.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/reborrow-in-loop-match-recursive-enum.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/reborrow-in-match-ref-mut-option.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/ref-mut-rebind-does-not-affect-outer.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/self-field-consume-with-drop-type.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/struct-field-move-with-drop-borrow.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/tuple-field-move-with-drop-borrow.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/use-moved-value-in-match-guard-drop.rs: [missing] -> pass (J1)
  • [ui] tests/ui/dyn-compatibility/unsafe-binders-bare-trait-object-next-solver.rs: [missing] -> pass (J1)
  • [ui] tests/ui/field_representing_types/invariant.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/field_representing_types/invariant.rs#old: [missing] -> pass (J1)
  • [ui] tests/ui/issues/issue-18566.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-18783.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-21400.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-25579.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-26619.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-27592.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-28839.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-28971.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-29053.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-29723.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-40288.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-41498.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-41726.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-42106.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-4335.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-44405.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-45697-1.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-45697.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-47703-1.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-47703-tuple.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-47703.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-52126-assign-op-invariance.rs: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/regress/builtin_derives_on_adts_with_never.rs: [missing] -> pass (J1)
  • [ui] tests/ui/privacy/private-fields-diagnostic-issue-151408.rs: [missing] -> pass (J1)
  • [codegen] tests/codegen-llvm/gpu-convergent.rs#amdgpu: [missing] -> pass (J3)
  • [codegen] tests/codegen-llvm/gpu-convergent.rs#nvptx: [missing] -> pass (J3)
  • [ui] tests/ui/asm/s390x/bad-reg.rs#s390x_vector_stable: ignore (gcc backend is marked as ignore) -> [missing] (J5)

(and 11 additional test diffs)

Additionally, 144 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 c771f6ee804969b5c046393c4110c22720e56114 --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. aarch64-apple: 2h 37m -> 3h 17m (+25.1%)
  2. tidy: 3m 3s -> 2m 39s (-13.2%)
  3. dist-i686-mingw: 2h 51m -> 2h 28m (-13.2%)
  4. dist-aarch64-apple: 1h 58m -> 2h 13m (+12.4%)
  5. x86_64-msvc-1: 2h 22m -> 2h 39m (+11.4%)
  6. x86_64-msvc-ext3: 1h 44m -> 1h 55m (+10.9%)
  7. dist-arm-linux-musl: 1h 39m -> 1h 50m (+10.1%)
  8. x86_64-gnu: 2h 28m -> 2h 14m (-9.6%)
  9. dist-x86_64-mingw: 2h 35m -> 2h 20m (-9.6%)
  10. aarch64-msvc-2: 1h 48m -> 1h 38m (-9.2%)
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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#151898 constify DoubleEndedIterator 6d99674de7f56ec6cf58a643bcda612f89832c2b (link)
#153995 Use convergent attribute to funcs for GPU targets 742f09c79af181f7aca097245baeed908546bad6 (link)
#154184 stabilize s390x vector registers d34e3efc6a4253dc56833ef842bc9d44d0b083b1 (link)
#154235 remove unnecessary variables and delimiter check 70245a45f3fba8530a3f4b382de4f90918b3ddc5 (link)
#154473 move borrow checker tests a064bd3e517649002371b581b080057350442798 (link)
#154745 Replace span_look_ahead with span_followed_by d1e94a0bd926c6fc0ba94e0b3678f2ad8f8225d5 (link)
#154778 make field representing types invariant over the base type d5ce5d9a89e0a8680909f8cdc888a066af021d53 (link)
#154867 Fix private fields diagnostics and improve error messages c2baf3b2611c34a19be67ec5b74786ff1f1cdcd6 (link)
#154879 Don't store pattern_ty in TestableCase eb45cbe08e0da96c71271168cf965ca681186263 (link)
#154910 Suppress unreachable_code lint in `derive(PartialEq, Clon… 5599764e8965fe45b5f922eaf761f3e44690c89c (link)
#154923 Fix ICE in next-solver dyn-compatibility check 08a2b60bf5c095ed5ebb0b2bdfb0271823d27303 (link)
#154934 Add getters for `rustc_pattern_analysis::constructor::Slice… d4981df7638d4431f5bb288404d04b152b8f1d9f (link)
#154938 match exhaustiveness: Show the guard exhaustivity note only… f5d22ea0d5e1fa804dcd316aa6917d2ad447c7af (link)
#154961 Use derived impl for GappedRange subdiagnostic 1ef2b7f72c5b74637aa3f690bb712d621bf86eba (link)
#154980 rustc-dev-guide subtree update dc2bda8bbfa42bfcfba08cafa88e0d1ad18399d1 (link)

previous master: e26dedca9d

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

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (c771f6e): comparison URL.

Overall result: ✅ 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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.3%] 7
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -2.2%)

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

Cycles

Results (primary 2.9%)

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

mean range count
Regressions ❌
(primary)
2.9% [2.1%, 3.6%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [2.1%, 3.6%] 2

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 488.355s -> 490.389s (0.42%)
Artifact size: 395.37 MiB -> 395.39 MiB (0.00%)

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. A-rustc-dev-guide Area: rustc-dev-guide merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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.