Skip to content

Rollup of 11 pull requests - #160383

Closed
JonathanBrouwer wants to merge 77 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-SCRL5CI
Closed

Rollup of 11 pull requests#160383
JonathanBrouwer wants to merge 77 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-SCRL5CI

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

folkertdev and others added 30 commits July 18, 2026 16:50
Add UI coverage for source-shaped local values before changing the renderer.

The new cases exercise structs, enum variants, tuples, arrays, slices, and
fallback leaf values so later commits can bless one behavior change at a time.
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
This updates the rust-version file to dfbea5b.
…e-buffer

skip weak memory buffer handling when there is only one thread
Route local value rendering through a source-shaped renderer helper.

At this step the helper still delegates leaves and unsupported shapes back to
the existing raw byte renderer, so the behavioral changes can land in focused
follow-up commits.
Render struct and struct-like ADT operands using their source field names.

Fields are projected from the operand and each leaf still uses the existing raw
renderer, producing output such as `Point { x: [..], y: [..] }` without relying
on user Debug or Display implementations.
Extend source-shaped ADT rendering to enum operands.

The renderer reads the runtime discriminant, downcasts to the active variant,
and then renders the payload fields with the same raw-leaf fallback used for
struct fields. Unit, tuple, and struct variants keep their Rust-like spelling.
Render tuple operands as positional source-shaped values.

Tuple elements are projected in source order and rendered through the existing
leaf renderer, including the trailing comma for one-element tuples.
Render array and slice operands as ordered source-shaped elements.

Fixed arrays use their layout count while slices use the runtime metadata length,
then `project_array_fields` supplies the element operands for raw-leaf rendering.
This updates the rust-version file to d3ea035.
…t-comment

fix `ptr_from_addr_cast` comment
…s-and-types-handling

[Priroda] Render projected locals with source-shaped values
Implement shims for vsha256hq_u32, vsha256h2q_u32, vsha256su0q_u32 and vsha256su1q_u32
Matches the naming already used in
the aarch64 SHA256 shims.
…ntrinsics

aarch64: implement SHA256 intrinsic shims
…r=clarfonthey

Move `std::io` tests to `alloctests` & add prelude

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
~~Blocked on: rust-lang#158548~~

## Description

* Moves tests out of `std::io` into `alloctests` now that the relevant items are fully available from `alloc::io`.
* Adds documentation to `alloc::io`
* Adds prelude modules to `core::io` and `alloc::io`.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
… r=Amanieu

Stabilize passing 128-bit integers via vector registers with `asm!` on x86

tracking issue: rust-lang#133416
reference PR: rust-lang/reference#2313

# Stabilization report

## Summary

Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64:

```rust
// Use 128-bit integers with vector registers.
let mut v = 0u128;

asm!("/* {:x} */", in(xmm_reg) v);
asm!("/* {:x} */", out(xmm_reg) v);

asm!("/* {:y} */", in(ymm_reg) v);
asm!("/* {:y} */", out(ymm_reg) v);

asm!("/* {:z} */", in(zmm_reg) v);
asm!("/* {:z} */", out(zmm_reg) v);
```

32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight.

This feature is part of [`asm_experimental_reg`](rust-lang#133416). We're not stabilizing that feature as a whole, but only pull out part of it.

## History

- rust-lang#151059

## Open questions

None.

r? Amanieu
Specialize `advance_by` method of `Fuse`

`advance_by` is used a lot internally so it seems important to specialize it.
…s, r=mejrs

borrowck: Simplify deps to build compiler 30s faster

`rustc_borrowck` uses two helpers from `rustc_traits`. One of them is re-exported from `rustc_trait_selection`, and the other can easily move to `rustc_trait_selection`.

Making `rustc_borrowck` use these helpers from `rustc_trait_selection` directly, and eliminating the `rustc_traits` dependency, allows starting to build `rustc_borrowck` earlier, which substantially speeds up building the compiler because `rustc_borrowck` is one of the last things to build.

On my system, this speeds up the rustc build by a little over 30s.
…htriplett

Allow only implementing `Read::read_buf`

This PR allows users to only implement `Read::read_buf`, without the need for implementing `Read::read`. `rustc_must_implement_one_of` annotation ensures that **at least** one of the methods is implemented, so that the default impls don't create infinite recursion.

Note that `Read::read_buf` is unstable, so this doesn't change anything on stable, there you still need to implement `Read::read`, since you can't implement `Read::read_buf`. Thus, we don't expose `rustc_must_implement_one_of` to stable.

r? @thomcc
tests: prefer max-llvm-major-version over open LLVM ranges

Per review, take option 3: replace open `ignore-llvm-version` ranges with `max-llvm-major-version`. Left gdb `X - 99.0` ranges alone so CI's older gdb still runs those tests.

Fixes rust-lang#159338.
allocations are allowed to grow (but not shrink)

This got permitted on the LLVM side about a year ago (llvm/llvm-project#141338), but didn't require any code changes since LLVM's optimizations were already compatible with growing allocations. That said, LLVM assumes that allocations created via operations it recognizes (e.g. `malloc`, `alloca`, or the Rust global allocator operations) never change their size, so we have to exclude that case.

This resolves a part of rust-lang/unsafe-code-guidelines#430.

It may seem strange that allocations can grow but not shrink, but we did have multiple users show up in #t-opsem with exactly that request. Cc @nhusung @foonathan; see [here](https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/Shrinking.20allocations.20in-place/near/612181257) and [here](https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/Shrinking.20allocations.20in-place/near/612191402) for some details about their use-cases.

Cc @rust-lang/opsem @rust-lang/lang
…parent-map, r=fee1-dead

fix: Do not stop `visible_parent_map` breadth-first search reaching children of `#[doc(hidden)]` modules

The `visible_parent_map` query misses putting the child items of `#[doc(hidden)]` modules into the queue, resulting in the breadth-first search missing them entirely. This results in inconsistent path printing behavior affecting diagnostics: namely that re-exports nested deeply within `#[doc(hidden)]` modules are not considered as a possible fallback path. See the linked issue (rust-lang#159880) for more details and an example of how this manifests in diagnostics.

This PR makes sure that `#[doc(hidden)]` parents in the fallback map are still searched as part of the breadth-first search.

Fixes rust-lang#159880.

The two tests for this change are based on the inconsistent diagnostics shown in the issue:
* `tests/ui/suggestions/suggest-path-through-direct-dep-crate/hidden-reexport-of-transitive-dep-item.rs` captures the current, expected behavior in the already working base case where the hidden module is still recorded in the fallback map;
* `tests/ui/suggestions/suggest-path-through-direct-dep-crate/hidden-reexport-of-nested-transitive-dep-item.rs` is a regression test for the breadth-first search covering nested children of `#[doc(hidden)]` modules to populate the fallback map by testing whether the diagnostic prefers the hidden but accessible path through the direct dependency crate.

Related PRs/issues:
* rust-lang#87349
* rust-lang#153477
…, r=petrochenkov

Add regression test for bool indexing codegen

Fixes rust-lang#123216
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 2, 2026
@rustbot rustbot added F-explicit_tail_calls `#![feature(explicit_tail_calls)]` 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. 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. labels Aug 2, 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-*

@rust-bors

rust-bors Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 22e6f7c 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 Aug 2, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 2, 2026
Rollup of 11 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-*
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-msvc-1 failed! Check out the build log: (web) (plain enhanced) (plain)

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

---- [assembly] tests\assembly-llvm\indexing-with-bools-no-redundant-instructions.rs stdout ----
------FileCheck.exe stdout------------------------------

------FileCheck.exe stderr------------------------------
D:\a\rust\rust\tests\assembly-llvm\indexing-with-bools-no-redundant-instructions.rs:15:12: error: CHECK: expected string not found in input
 // CHECK: testl %esi, %esi
           ^
D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\assembly-llvm\indexing-with-bools-no-redundant-instructions\indexing-with-bools-no-redundant-instructions.s:15:12: note: scanning from here
bool_index:
           ^
D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\assembly-llvm\indexing-with-bools-no-redundant-instructions\indexing-with-bools-no-redundant-instructions.s:16:2: note: possible intended match here
 testb %dl, %dl
 ^

Input file: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\assembly-llvm\indexing-with-bools-no-redundant-instructions\indexing-with-bools-no-redundant-instructions.s
Check file: D:\a\rust\rust\tests\assembly-llvm\indexing-with-bools-no-redundant-instructions.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1:  .def @feat.00; 
            2:  .scl 3; 
            3:  .type 0; 
            4:  .endef 
            5:  .globl @feat.00 
            6: @feat.00 = 0 
            7:  .file "indexing_with_bools_no_redundant_instructions.43d038d86a482d16-cgu.0" 
            8:  .def bool_index; 
            9:  .scl 2; 
           10:  .type 32; 
           11:  .endef 
           12:  .section .text,"xr",one_only,bool_index,unique,0 
           13:  .globl bool_index 
           14:  .p2align 4 
           15: bool_index: 
check:15'0                X error: no match found
           16:  testb %dl, %dl 
check:15'0     ~~~~~~~~~~~~~~~~
check:15'1      ?               possible intended match
           17:  je .LBB0_2 
check:15'0     ~~~~~~~~~~~~
           18:  xorb %r8b, %cl 
check:15'0     ~~~~~~~~~~~~~~~~
           19:  orb $1, (%r9) 
check:15'0     ~~~~~~~~~~~~~~~
           20: .LBB0_2: 
check:15'0     ~~~~~~~~~
           21:  movzbl %cl, %eax 
check:15'0     ~~~~~~~~~~~~~~~~~~
           22:  andl $1, %eax 
check:15'0     ~~~~~~~~~~~~~~~
           23:  shll $4, %eax 
check:15'0     ~~~~~~~~~~~~~~~
           24:  orb $1, (%r9,%rax) 
check:15'0     ~~~~~~~~~~~~~~~~~~~~
           25:  retq 
check:15'0     ~~~~~~
           26:  
check:15'0     ~
>>>>>>

------------------------------------------

error: verification with 'FileCheck' failed
status: exit code: 1
command: PATH=";C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64;C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\bin\HostX64\x64;C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\bin\HostX64\x64;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\runneradmin\bin;D:\a\rust\rust\ninja;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\7.0\bin;C:\vcpkg;C:\tools\zstd;C:\hostedtoolcache\windows\stack\3.11.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.6.1\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.24.13\x64\bin;C:\hostedtoolcache\windows\Python\3.12.10\x64\Scripts;C:\hostedtoolcache\windows\Python\3.12.10\x64;C:\hostedtoolcache\windows\Ruby\3.3.12\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\17.0.19-10\x64\bin;C:\Program Files\ImageMagick-7.1.2-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\dotnet;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\Program Files\Microsoft SQL Server\170\DTS\Binn;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.16\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\mongosh;C:\Program Files\LLVM\bin;C:\Program Files (x86)\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\bin\HostX64\x64" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\llvm\\build\\bin\\FileCheck.exe" "--input-file" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\assembly-llvm\\indexing-with-bools-no-redundant-instructions\\indexing-with-bools-no-redundant-instructions.s" "D:\\a\\rust\\rust\\tests\\assembly-llvm\\indexing-with-bools-no-redundant-instructions.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
D:\a\rust\rust\tests\assembly-llvm\indexing-with-bools-no-redundant-instructions.rs:15:12: error: CHECK: expected string not found in input
 // CHECK: testl %esi, %esi
           ^
D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\assembly-llvm\indexing-with-bools-no-redundant-instructions\indexing-with-bools-no-redundant-instructions.s:15:12: note: scanning from here
bool_index:
           ^
D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\assembly-llvm\indexing-with-bools-no-redundant-instructions\indexing-with-bools-no-redundant-instructions.s:16:2: note: possible intended match here
 testb %dl, %dl
 ^

Input file: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\assembly-llvm\indexing-with-bools-no-redundant-instructions\indexing-with-bools-no-redundant-instructions.s
Check file: D:\a\rust\rust\tests\assembly-llvm\indexing-with-bools-no-redundant-instructions.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1:  .def @feat.00; 
            2:  .scl 3; 
            3:  .type 0; 
            4:  .endef 
            5:  .globl @feat.00 
            6: @feat.00 = 0 
            7:  .file "indexing_with_bools_no_redundant_instructions.43d038d86a482d16-cgu.0" 
            8:  .def bool_index; 
            9:  .scl 2; 
           10:  .type 32; 
           11:  .endef 
           12:  .section .text,"xr",one_only,bool_index,unique,0 
           13:  .globl bool_index 
           14:  .p2align 4 
           15: bool_index: 
check:15'0                X error: no match found
           16:  testb %dl, %dl 
check:15'0     ~~~~~~~~~~~~~~~~
check:15'1      ?               possible intended match
           17:  je .LBB0_2 
check:15'0     ~~~~~~~~~~~~
           18:  xorb %r8b, %cl 
check:15'0     ~~~~~~~~~~~~~~~~
           19:  orb $1, (%r9) 
check:15'0     ~~~~~~~~~~~~~~~
           20: .LBB0_2: 
check:15'0     ~~~~~~~~~
           21:  movzbl %cl, %eax 
check:15'0     ~~~~~~~~~~~~~~~~~~
           22:  andl $1, %eax 
check:15'0     ~~~~~~~~~~~~~~~
           23:  shll $4, %eax 
check:15'0     ~~~~~~~~~~~~~~~
           24:  orb $1, (%r9,%rax) 
check:15'0     ~~~~~~~~~~~~~~~~~~~~
           25:  retq 
check:15'0     ~~~~~~
           26:  
check:15'0     ~
>>>>>>
------------------------------------------

---
Currently active steps:
test::AssemblyLlvm { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-msvc, forced_compiler: false }, target: x86_64-pc-windows-msvc } at src\bootstrap\src\core\build_steps\test.rs:1980
test::Compiletest { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-msvc, forced_compiler: false }, target: x86_64-pc-windows-msvc, mode: assembly, suite: "assembly-llvm", path: "tests/assembly-llvm", compare_mode: None } at src\bootstrap\src\core\build_steps\test.rs:1980
Build completed unsuccessfully in 1:44:17
make: *** [Makefile:115: ci-msvc-py] Error 1
  local time: Sun Aug  2 14:05:52 CUT 2026
  network time: Sun, 02 Aug 2026 14:05:52 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@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 Aug 2, 2026
@rust-bors

rust-bors Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

PR #159977, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rust-bors

rust-bors Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

💔 Test for bd373a8 failed: CI. Failed jobs:

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

Labels

F-explicit_tail_calls `#![feature(explicit_tail_calls)]` 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. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.