Skip to content

Rollup of 13 pull requests#158891

Merged
rust-bors[bot] merged 29 commits into
rust-lang:mainfrom
jhpratt:rollup-ziqyJdz
Jul 7, 2026
Merged

Rollup of 13 pull requests#158891
rust-bors[bot] merged 29 commits into
rust-lang:mainfrom
jhpratt:rollup-ziqyJdz

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 7, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

adwinwhite and others added 29 commits June 27, 2026 16:25
Introduce a dedicated panic for null reference production to distinguish
producing a reference from a null pointer from an actual null pointer
dereference.

This emits a dedicated panic message for null reference production while
preserving the existing panic for actual dereferences.
This field is not used anywhere.
For reference, the helper function was introduced in 2a3969a. In
any case, the code becomes simpler if we remove it now, so let's remove
it.
Use correct typing mode in mir building for the next solver

Previously, we used typing env `non_body_analysis`  when building MIR body.
This is wrong because we're in a body and should reveal opaque types defined in this scope.

Fixes rust-lang#158439
Fixes rust-lang#158429

r? lcnr or anyone familiar with typing modes.
Distinguish null reference production from null pointer dereference in UB checks

Closes rust-lang#154044

This change distinguishes null reference production from actual null pointer dereferences in the UB checks.

Producing a reference from a null pointer (for example, `&*ptr`) is undefined behavior even if no memory is dereferenced. This change introduces a dedicated `AssertKind::NullReferenceConstructed` and runtime panic so these cases produce a more accurate diagnostic while preserving the existing panic for actual null pointer dereferences.

Summary
- Add `AssertKind::NullReferenceConstructed`.
- Emit it for null reference production in the MIR null check pass.
- Add `panic_null_reference_constructed` and its lang item.
- Keep `NullPointerDereference` for actual dereferences.
- Update the affected UI tests.
…ders-ice, r=chenyukang

add regression test for late-bound type method probe ICE

Closes rust-lang#149014
…Kobzol

Update the rustc_perf submodule

I hope this is a thing that's ok to do, I never update submodules but this one seems to be 8 months old and we got some new benchmarks in the meantime.

r? @Kobzol
…r=lcnr

Prevent rustdoc auto-trait ICEs with `-Znext-solver=globally`

- Ensure rustdoc with `-Znext-solver=globally` does not ICE.

r? @lcnr
Instatiate binder instead of skipping when suggesting function arg error

Fixes rust-lang#158317

r? lcnr
Avoid infinite recursion when trying to build valtrees for self-referential consts

This PR adds cycle detection to `const_to_valtree_inner` by using a tricolor DFS, so self-referential statics in pats don't cause valtree construction to recurse infinitely. Instead, we now return a new `ValTreeCreationError::CyclicConst`, similar to the current `InvalidConst` and `NodesOverflow` variants.

fixes rust-lang#144719
…arantees, r=clarfonthey

Document blocking guarantees for `std::sync`

Per rust-lang#157728, this PR documents how exactly functions/methods in `std::mpsc` (and `mpmc`) block.

Copied from the issue:
> For the wasm part of this specifically, yes, using a mutex anywhere is basically forbidden on the main thread in browsers. Personally I don't think it's reasonable to expect the standard library to use zero mutexes on wasm and make absolutely everything lock-free. This is a consequence of browsers and not something Rust can "just" fix. Basically I would not recommend changing the implementation and instead leaving it as-is. I'll note that there's a long and storied history of blocking-the-main-thread-with-wasm-threads in the browser, and I'm not putting in all the context here.
>
> \- alexcrichton

(P.S. documentation seems to be line wrapped but doesn't have a consistent wrapping width? I tried to match the surrounding style as best as I could; let me know if there's something better I should've done)

Fixes rust-lang#157728
…r=nnethercote

Delete `impl_def_id` field from `ImplHeader`

This field is not used anywhere.
rewrite `Align::max_for_target` in a more obvious way

r? scottmcm

The old version was just as correct, and arguably this doesn't matter, but oh well...

Following the confusion in https://github.com/rust-lang/rust/pull/152929/changes#r2836568710.
…int_info, r=jieyouxu

borrowck: Inline `free_region_constraint_info()` to simplify the code

For reference, the helper function was introduced in 2a3969a. But, the code becomes simpler if we remove the helper function, so let's remove it.

This takes us one step closer (this is commit 3 of 4) towards the end result illustrated in rust-lang#158623.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 7, 2026
@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. 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 Jul 7, 2026
@jhpratt

jhpratt commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6673d7d 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 Jul 7, 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 Jul 7, 2026
@rust-bors

rust-bors Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 19m 18s
Pushing bcd9ae8 to main...

@rust-bors rust-bors Bot merged commit bcd9ae8 into rust-lang:main Jul 7, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

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 b960fcf (parent) -> bcd9ae8 (this PR)

Test differences

Show 425 test diffs

Stage 1

  • [ui (polonius)] tests/ui/associated-types/self-type-projection-dyn-coerce.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/coherence/error-type-coherence-no-ice.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/const-generics/adt_const_params/cyclic-const-generic-issue-144719.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/consts/const_in_pattern/cyclic-const-dag-pass.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/consts/const_in_pattern/cyclic-const-long-chain-issue-144719.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/consts/const_in_pattern/cyclic-const-mutual-issue-144719.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/consts/const_in_pattern/cyclic-const-pattern-issue-144719.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/drop/drop-value-by-method.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/drop/panic-in-drop-during-assignment.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/dst/unsized-tuple-trait-tail.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/issues/issue-29857.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-30255.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-30371.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-30380.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-31011.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-3149.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-31776.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-3220.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-32995.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-3344.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/issues/issue-33461.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/lifetimes/lifetime-errors/elision-error-omits-lifetimeless-params.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/lint/unused/for-loop-no-spurious-unused-variable-lint.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/macros/no-field-error-in-macro-expansion-for-generic.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/privacy/required-pub-in-blocks.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/resolve/generic-struct-and-fn-share-name.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/resolve/impl-trait-for-undeclared-type.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/error-reporting/incomplete-partial-ord-impl.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/late-bound-type-method-probe.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/next-solver/diagnostics/iterator-item-suggest-no-ice.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/next-solver/opaques/wrong-typing-mode-ice-2.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/typeck/parenthesized-type-parameters-error-32995.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/typeck/parenthesized-type-params-in-paths.rs: [missing] -> pass (J0)
  • [ui] tests/ui/coherence/error-type-coherence-no-ice.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/adt_const_params/cyclic-const-generic-issue-144719.rs: [missing] -> pass (J1)
  • [ui] tests/ui/consts/const_in_pattern/cyclic-const-dag-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/consts/const_in_pattern/cyclic-const-long-chain-issue-144719.rs: [missing] -> pass (J1)
  • [ui] tests/ui/consts/const_in_pattern/cyclic-const-mutual-issue-144719.rs: [missing] -> pass (J1)
  • [ui] tests/ui/consts/const_in_pattern/cyclic-const-pattern-issue-144719.rs: [missing] -> pass (J1)
  • [ui] tests/ui/drop/panic-in-drop-during-assignment.rs: [missing] -> pass (J1)
  • [ui] tests/ui/dst/unsized-tuple-trait-tail.rs: [missing] -> pass (J1)
  • [ui] tests/ui/issues/issue-29857.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-30255.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-30371.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-30380.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-30589.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-31011.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-3149.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-31776.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-3220.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-32995.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-3344.rs: pass -> [missing] (J1)
  • [ui] tests/ui/lifetimes/lifetime-errors/elision-error-omits-lifetimeless-params.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/unused/for-loop-no-spurious-unused-variable-lint.rs: [missing] -> pass (J1)
  • [ui] tests/ui/macros/no-field-error-in-macro-expansion-for-generic.rs: [missing] -> pass (J1)
  • [ui] tests/ui/privacy/required-pub-in-blocks.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/generic-struct-and-fn-share-name.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/impl-trait-for-undeclared-type.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/error-reporting/incomplete-partial-ord-impl.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/late-bound-type-method-probe.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/diagnostics/iterator-item-suggest-no-ice.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/opaques/wrong-typing-mode-ice-1.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/opaques/wrong-typing-mode-ice-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/typeck/parenthesized-type-params-in-paths.rs: [missing] -> pass (J1)
  • [rustdoc-html] tests/rustdoc-html/synthetic_auto/next-solver-ambiguity.rs: [missing] -> pass (J4)
  • [rustdoc-html] tests/rustdoc-html/synthetic_auto/next-solver-possible-impl.rs: [missing] -> pass (J4)
  • [ui] tests/rustdoc-ui/synthetic-auto-trait-impls/next-solver-globally.rs: [missing] -> pass (J4)

Stage 2

  • [ui] tests/ui/coherence/error-type-coherence-no-ice.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/adt_const_params/cyclic-const-generic-issue-144719.rs: [missing] -> pass (J2)
  • [ui] tests/ui/consts/const_in_pattern/cyclic-const-dag-pass.rs: [missing] -> pass (J2)
  • [ui] tests/ui/consts/const_in_pattern/cyclic-const-long-chain-issue-144719.rs: [missing] -> pass (J2)
  • [ui] tests/ui/consts/const_in_pattern/cyclic-const-mutual-issue-144719.rs: [missing] -> pass (J2)
  • [ui] tests/ui/consts/const_in_pattern/cyclic-const-pattern-issue-144719.rs: [missing] -> pass (J2)
  • [ui] tests/ui/drop/drop-value-by-method.rs: [missing] -> pass (J2)
  • [ui] tests/ui/drop/panic-in-drop-during-assignment.rs: [missing] -> pass (J2)
  • [ui] tests/ui/dst/unsized-tuple-trait-tail.rs: [missing] -> pass (J2)
  • [ui] tests/ui/issues/issue-29857.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-30255.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-30371.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-30380.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-30589.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-31011.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-31776.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-3220.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-32995.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-3344.rs: pass -> [missing] (J2)
  • [ui] tests/ui/lifetimes/lifetime-errors/elision-error-omits-lifetimeless-params.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lint/unused/for-loop-no-spurious-unused-variable-lint.rs: [missing] -> pass (J2)
  • [ui] tests/ui/macros/no-field-error-in-macro-expansion-for-generic.rs: [missing] -> pass (J2)
  • [ui] tests/ui/privacy/required-pub-in-blocks.rs: [missing] -> pass (J2)
  • [ui] tests/ui/resolve/generic-struct-and-fn-share-name.rs: [missing] -> pass (J2)
  • [ui] tests/ui/resolve/impl-trait-for-undeclared-type.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/error-reporting/incomplete-partial-ord-impl.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/late-bound-type-method-probe.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/next-solver/diagnostics/iterator-item-suggest-no-ice.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/next-solver/opaques/wrong-typing-mode-ice-1.rs: [missing] -> pass (J2)
  • [ui] tests/ui/typeck/parenthesized-type-parameters-error-32995.rs: pass -> [missing] (J2)
  • [ui] tests/ui/typeck/parenthesized-type-params-in-paths.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/synthetic_auto/next-solver-ambiguity.rs: [missing] -> pass (J3)
  • [rustdoc-html] tests/rustdoc-html/synthetic_auto/next-solver-possible-impl.rs: [missing] -> pass (J3)

(and 11 additional test diffs)

Additionally, 314 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 bcd9ae8b77e8a1d03d73b51f1fd9cb99565cfdc5 --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-gcc-core-tests: 8m 55s -> 14m 22s (+61.0%)
  2. dist-x86_64-msvc-alt: 2h 1m -> 2h 45m (+36.5%)
  3. x86_64-gnu-llvm-22-2: 1h 18m -> 1h 46m (+35.3%)
  4. dist-x86_64-solaris: 1h 15m -> 1h 36m (+27.2%)
  5. dist-i686-msvc: 2h 3m -> 1h 30m (-26.6%)
  6. x86_64-msvc-ext3: 1h 51m -> 1h 23m (-25.3%)
  7. dist-x86_64-msvc: 2h 4m -> 1h 33m (-25.0%)
  8. dist-x86_64-llvm-mingw: 1h 54m -> 1h 27m (-23.3%)
  9. dist-riscv64-linux: 1h 26m -> 1h 43m (+20.6%)
  10. x86_64-rust-for-linux: 45m 32s -> 54m 15s (+19.1%)
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
#158478 Use correct typing mode in mir building for the next solver 4fc8075b3c9945466010976ee6642867723f2274 (link)
#158796 Distinguish null reference production from null pointer der… 3a5fcd82bbbc51b94c247d5977b3e832da242f20 (link)
#158821 add regression test for late-bound type method probe ICE 36ace55d4443798dfbac0fed369078ea1034d5dc (link)
#158245 Update the rustc_perf submodule 971d8052af7e1980243778fd5ab13cb8aa3b63b8 (link)
#158346 Prevent rustdoc auto-trait ICEs with `-Znext-solver=globall… 8c442c08d0d3e7f852ab589c3f7e6267f67936fe (link)
#158536 Instatiate binder instead of skipping when suggesting funct… 2bf9053421cb4794a57a0bf2b1ac6275bcd25974 (link)
#158553 Avoid infinite recursion when trying to build valtrees for … 6f14fe998929220d1d72936d15155acb45c81e8d (link)
#158679 Document blocking guarantees for std::sync d6a56c8b1bd9fc5251b54443b4bbb9fd39d96cf6 (link)
#158826 Reorganize tests/ui/issues [19/N] 6243d666303b1ea44ee6a65df4957ef264bd6b79 (link)
#158860 Delete impl_def_id field from ImplHeader 2ccfab7336a274ebe079464c59e37fe1929d47ae (link)
#158867 rewrite Align::max_for_target in a more obvious way 3cd6f6a877e8b6a3a36e454dc2a210c2abd56d4f (link)
#158878 borrowck: Inline free_region_constraint_info() to simplif… 0164420250f880470619257b70000c3cd5bff31f (link)
#158881 Update mdbook to 0.5.4 26bcdd5dd2fd9cef851468b42c2da9075ed2965b (link)

previous master: b960fcf2ff

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 (bcd9ae8): 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.7%, secondary -4.5%)

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

mean range count
Regressions ❌
(primary)
0.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.4% [-4.4%, -1.1%] 3
Improvements ✅
(secondary)
-4.5% [-4.5%, -4.5%] 1
All ❌✅ (primary) -1.7% [-4.4%, 0.5%] 4

Cycles

Results (primary 0.3%, secondary 0.4%)

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.9%, 2.9%] 1
Regressions ❌
(secondary)
3.8% [3.8%, 3.8%] 1
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-3.1% [-3.1%, -3.1%] 1
All ❌✅ (primary) 0.3% [-2.4%, 2.9%] 2

Binary size

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

Bootstrap: 489.183s -> 488.52s (-0.14%)
Artifact size: 388.47 MiB -> 388.99 MiB (0.13%)

@jhpratt jhpratt deleted the rollup-ziqyJdz branch July 7, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. 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.