Skip to content

Rollup of 10 pull requests - #160332

Closed
JonathanBrouwer wants to merge 27 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-fmKeOVh
Closed

Rollup of 10 pull requests#160332
JonathanBrouwer wants to merge 27 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-fmKeOVh

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

RalfJung and others added 27 commits July 18, 2026 10:33
Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
When we suggest implementing a missing trait item (or group of items
from `must_implement_one_of`), label any unstable items, so the user
doesn't get confused by suggestions to implement an unstable item
parallel to suggestions to implement stable items.
Includes a test for unstable trait methods.
…null`

* replace unsafe usage of `NonNull::new_unchecked` with `NonNull::from_mut`
* apply review feedback
* apply review feedback again!
Adding noundef to a PassMode::Cast is only sound when the cast target covers no
more bytes than the layout, otherwise the extra register bytes are undef padding.
In adjust_for_rust_abi this holds by construction (the cast is sized to
layout.size), so the current layout_is_noundef-only check is correct but relies
on that implicitly.

Extract the decision into ArgAbi::cast_to_maybe_noundef, which forwards NoUndef
only when layout_is_noundef(layout) && cast.size == layout.size, and switch the
aggregate-immediate site to it. No behavior change.
This check is now done from `finalise_check` in the attribute parser by
emitting `TrackCallerOnLangItem`. This replaces `check_track_caller` in
`rust_passes`.
stabilize size_of_val_raw, align_of_val_raw, Layout::for_value_raw

Stabilizes versions of `size_of_val_raw` and friends that can be invoked on raw pointers, which means they can be used even if one does not have a pointer to a "valid value". This was held up for a while because figuring out the exact safety requirements is tricky, but I think the ones we now have had for a while (plus the minor clarifications in this PR) are "good enough": we basically do case distinction on the unsized tail of the type, and spell out the appropriate requirement for each case. This avoids making blanket statements about future kinds of DST that we may introduce eventually.

These are the requirements I should we should stabilize:

```
    /// - If `T` is `Sized`, this function is always safe to call.
    /// - If the unsized tail of `T` is:
    ///     - a [slice] `[U]`, `str`, or a [trait object] `dyn Trait`, then the size of the *entire value*
    ///       (dynamic tail length + statically sized prefix) must fit in `isize`.
    ///       For the special case where the dynamic tail length is 0, this function
    ///       is safe to call.
    //        NOTE: the reason this is safe is that if an overflow were to occur already with size 0,
    //        then we would stop compilation as even the "statically known" part of the type would
    //        already be too big (or the call may be in dead code and optimized away, but then it
    //        doesn't matter).
    ///     - No other kind of unsized tail currently exists that satisfies the trait bounds for this
    ///       function. If more kinds of unsized tails get introduced in the future, the documentation
    ///       of this function will have to be extended before it can be used for such types.
```

Going over the open questions from the [tracking issue](rust-lang#69835):
-  What should the exact safety requirements of these functions be? -> the currently documented requirement look good to me.
- How should this interact with extern types? -> what we document looks good here; we can still adjust this until extern types are stabilized.
- Are the functions sound to call on invalid data pointers? -> for the unsized tails that currently exist: yes; that's kind of the only reason to use them.

Cc @rust-lang/opsem @rust-lang/lang
(FCP should probably include both teams, unless lang is okay with fully delegating this to t-opsem)
I'll nominate the tracking issue for libs-api so we can get their approval as well for how the operation is exposed.

Fixes rust-lang#69835
miri: ensure validity of references and pointers we dereference and cast

Conceptually, when we evaluate the place expression `*place`, there are two steps that happen:
- perform a (typed) load from `place`, which yields a value of pointer/ref type
- construct a new place from that value

Since this is a typed load, we have to ensure that the value satisfies the validity invariant. We forgot to do that, which led to Miri missing a bunch of UB. This PR fixes that by adding the missing checks.

Triggering this UB is a bit non-trivial: you cannot just store an invalid value into `place` using regular assignment (that would already be caught as part of the assignment). However, you can take a raw pointer to `place` and then use that to mutate the contents of `place` in a way that its validity invariant no longer holds. For example:
```rust
fn main() {
    let mut x = &();
    // Overwrite `x` with null.
    unsafe { (&raw mut x).cast::<usize>().write(0) };
    let _val = *x; //~ERROR: null reference
}
```
This program clearly (IMO) should have UB, and has UB in MiniRust, but Miri accepted that program before this PR. The same applies to references that are invalid because they are unaligned (even if we end up only accessing a 1-aligned field, i.e. the rest of the place expression evaluates just fine), and to references that are invalid because they are not dereferenceable (even if we end up projecting to a zero-sized field, i.e., the rest of the place expression evaluates just fine).

Even raw pointers have this problem: a raw pointer can be invalid if its vtable pointer is wrong, and we did not check that.

And finally, this also affects `Box`, and this is where things get tricky. `Box` derefs are not even present any more in the MIR Miri sees; they have been replaced by derefs of the underlying raw pointer. But that means we have no way to know that we should check all those things. So to fix that I adjusted the ElaborateBoxDerefs to emit a new special kind of cast that's almost a transmute but also checks `Box` validity.

Fixes rust-lang/miri#5226
Fixes rust-lang/unsafe-code-guidelines#617
Cc @rust-lang/opsem
…eyouxu

Update Enzyme to resolve one of the open bugs
…acrum

allocations: document that they can be read-only

Miri currently tracks "read-only" as an explicit flag on allocations that exists independent of provenance. It essentially corresponds to a read-only mapping in the page table.

Let's make this officially part of our model.
Cc @rust-lang/lang @rust-lang/opsem
…-no-unstable-suggestions, r=JohnTitor

When issuing suggestions for missing trait items, label unstable items

When we suggest implementing a missing trait item (or group of items from `must_implement_one_of`), label any unstable items, so the user doesn't get confused by suggestions to implement an unstable item parallel to suggestions to implement stable items.
…=jhpratt,RalfJung

Replace unsafe usage of `NonNull::new_unchecked` with `Box::into_non_null`

~~We can avoid unsafe by replacing `unsafe { NonNull::new_unchecked(Box::into_raw(..)) }` with `NonNull::from_mut(Self::leak(..))`. A simple test to demonstrate the code generation is equivalent: https://godbolt.org/z/P5q9bzPPK~~

We can avoid unsafe by replacing `unsafe { NonNull::new_unchecked(Box::into_raw(..)) }` with the (soon-to-be-stable) `Box::into_non_null(..)`

Additionally, slightly tweak documentation.
Remove final use of sealed traits from stdlib

Now that stdarch has been updated, this vestigial trait is no longer needed. Since I last touched this, there was one additional usage of it added. This has been removed in favor of the native `impl(self)` syntax.

r? libs
…-guard, r=RalfJung

Make the noundef-on-Cast size guard explicit

`ArgAbi::cast_to` drops the argument's `ArgAttributes`. rust-lang#152864 restored `noundef` on `PassMode::Cast` for the Rust ABI by re-adding it via `cast_to_with_attrs` when `layout_is_noundef` is true.

This works today because `adjust_for_rust_abi` constructs a `Reg { Integer, size }` with `size == layout.size`. However, this assumption isn't guarded anywhere - if this pattern gets reused where a cast is wider than the layout (like foreign ABIs using `Uniform::new` rounding up), padding bytes would be incorrectly marked as `noundef`.

This PR adds an explicit size check via a new `ArgAbi::cast_to_maybe_noundef` helper, which only emits `NoUndef` if `layout_is_noundef(layout)` and `cast.size(cx) <= layout.size`.

No functional change intended. Existing tests (like `abi-noundef-cast`) continue to pass.

Split out from the foreign-ABI work per the Zulip thread; foreign `Reg::iN` sites will reuse this helper in a follow-up PR.

r? @RalfJung
Box::leak: tell people to avoid unleaking

r? @nia-e
Cc @rust-lang/opsem

Note that this goes against the advice given by clippy in rust-lang/rust-clippy#17336. I think clippy should be adjusted to recommend `Box::into_non_null` instead. @ArhanChaudhary wold be great if you could make a clippy PR for that. :)
…to_attribute_parser, r=JonathanBrouwer

Move `check_track_caller` into the attribute parser

cc rust-lang#153101
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 1, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) F-autodiff `#![feature(autodiff)]` labels Aug 1, 2026
@rustbot rustbot added 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 Aug 1, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a77b919 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 1, 2026
@rust-bors

This comment has been minimized.

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

Rollup of 10 pull requests

Successful merges:

 - #157572 (stabilize size_of_val_raw, align_of_val_raw, Layout::for_value_raw)
 - #160012 (miri: ensure validity of references and pointers we dereference and cast)
 - #160294 (Update Enzyme to resolve one of the open bugs)
 - #159503 (allocations: document that they can be read-only)
 - #160250 (When issuing suggestions for missing trait items, label unstable items)
 - #160251 (Replace unsafe usage of `NonNull::new_unchecked` with `Box::into_non_null`)
 - #160311 (Remove final use of sealed traits from stdlib)
 - #160313 (Make the noundef-on-Cast size guard explicit)
 - #160323 (Box::leak: tell people to avoid unleaking)
 - #160328 (Move `check_track_caller` into the attribute parser)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job i686-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)
failures:

---- [debuginfo-cdb] tests\debuginfo\msvc-scalarpair-params.rs stdout ----

error: check directive(s) from `D:\a\rust\rust\tests\debuginfo\msvc-scalarpair-params.rs` not found in debugger output. errors:
    (msvc-scalarpair-params.rs:30) `t1               : (0xa, 0x14) [Type: tuple$<u32,u32>]`
    (msvc-scalarpair-params.rs:31) `    [0]              : 0xa [Type: unsigned int]`
    (msvc-scalarpair-params.rs:32) `    [1]              : 0x14 [Type: unsigned int]`
    (msvc-scalarpair-params.rs:34) `t2               : (0x1e, 0x28) [Type: tuple$<u64,u64>]`
    (msvc-scalarpair-params.rs:35) `    [0]              : 0x1e [Type: unsigned __int64]`
    (msvc-scalarpair-params.rs:36) `    [1]              : 0x28 [Type: unsigned __int64]`
    (msvc-scalarpair-params.rs:48) `s                : { len=0x5 } [Type: ref$<slice2$<u8> >]`
    (msvc-scalarpair-params.rs:49) `    [len]            : 0x5 [Type: unsigned [...]]`
    (msvc-scalarpair-params.rs:50) `    [0]              : 0x1 [Type: unsigned char]`
    (msvc-scalarpair-params.rs:51) `    [1]              : 0x2 [Type: unsigned char]`
    (msvc-scalarpair-params.rs:52) `    [2]              : 0x3 [Type: unsigned char]`
    (msvc-scalarpair-params.rs:53) `    [3]              : 0x4 [Type: unsigned char]`
    (msvc-scalarpair-params.rs:54) `    [4]              : 0x5 [Type: unsigned char]`
the following subset of check directive(s) was found successfully:
    (msvc-scalarpair-params.rs:7) `r1               : (0xa..0xc) [Type: core::ops::range::Range<u32>]`
    (msvc-scalarpair-params.rs:9) `r2               : (0x14..0x1e) [Type: core::ops::range::Range<u64>]`
    (msvc-scalarpair-params.rs:14) `r1               : (0x9..0x64) [Type: core::ops::range::Range<u32>]`
    (msvc-scalarpair-params.rs:16) `r2               : (0xc..0x5a) [Type: core::ops::range::Range<u64>]`
    (msvc-scalarpair-params.rs:21) `o1               : Some [Type: enum2$<core::option::Option<u32> >]`
    (msvc-scalarpair-params.rs:22) `    [+0x004] __0              : 0x4d2 [Type: unsigned int]`
    (msvc-scalarpair-params.rs:24) `o2               : Some [Type: enum2$<core::option::Option<u64> >]`
    (msvc-scalarpair-params.rs:25) `    [+0x008] __0              : 0x162e [Type: unsigned __int64]`
    (msvc-scalarpair-params.rs:41) `s                : "this is a static str" [Type: ref$<str$>]`
    (msvc-scalarpair-params.rs:42) `    [len]            : 0x14 [Type: unsigned int]`
    (msvc-scalarpair-params.rs:43) `    [chars]         `
status: exit code: 0
command: PATH="D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\lib\rustlib\i686-pc-windows-msvc\lib;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\x86;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.11\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\x86" "C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x86\\cdb.exe" "-lines" "-cf" "D:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\test\\debuginfo\\msvc-scalarpair-params.cdb\\msvc-scalarpair-params.debugger.script" "D:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\test\\debuginfo\\msvc-scalarpair-params.cdb\\a.exe"
--- stdout -------------------------------

************* Preparing the environment for Debugger Extensions Gallery repositories **************
   ExtensionRepository : Implicit
   UseExperimentalFeatureForNugetShare : true
   AllowNugetExeUpdate : true
   NonInteractiveNuget : true
   AllowNugetMSCredentialProviderInstall : true
   AllowParallelInitializationOfLocalRepositories : true

   EnableRedirectToV8JsProvider : false

   -- Configuring repositories
      ----> Repository : LocalInstalled, Enabled: true
      ----> Repository : UserExtensions, Enabled: true

>>>>>>>>>>>>> Preparing the environment for Debugger Extensions Gallery repositories completed, duration 0.000 seconds

************* Waiting for Debugger Extensions Gallery to Initialize **************

>>>>>>>>>>>>> Waiting for Debugger Extensions Gallery to Initialize completed, duration 0.016 seconds
   ----> Repository : UserExtensions, Enabled: true, Packages count: 0
   ----> Repository : LocalInstalled, Enabled: true, Packages count: 29

Microsoft (R) Windows Debugger Version 10.0.26100.8249 X86
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: D:\a\rust\rust\build\i686-pc-windows-msvc\test\debuginfo\msvc-scalarpair-params.cdb\a.exe

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is: 
ModLoad: 001d0000 001d6000   a.exe   
ModLoad: 776d0000 77890000   ntdll.dll
ModLoad: 761d0000 762c0000   C:\Windows\SysWOW64\KERNEL32.DLL
ModLoad: 758f0000 75bb5000   C:\Windows\SysWOW64\KERNELBASE.dll
ModLoad: 74750000 747fd000   C:\Windows\SysWOW64\apphelp.dll
ModLoad: 75bc0000 75cd0000   C:\Windows\SysWOW64\ucrtbase.dll
ModLoad: 739c0000 73aa2000   D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\lib\rustlib\i686-pc-windows-msvc\lib\std-5b934648c9313ccf.dll
ModLoad: 75880000 758e1000   C:\Windows\SysWOW64\WS2_32.dll
ModLoad: 76c20000 76cdc000   C:\Windows\SysWOW64\RPCRT4.dll
ModLoad: 75590000 75607000   C:\Windows\SysWOW64\bcryptprimitives.dll
ModLoad: 75040000 7505d000   C:\Windows\SysWOW64\VCRUNTIME140.dll
ModLoad: 75060000 7507f000   C:\Windows\SysWOW64\USERENV.dll
(131c.258c): Break instruction exception - code 80000003 (first chance)
eax=00000000 ebx=00000000 ecx=f8770000 edx=00000000 esi=01329de8 edi=00fff000
eip=777e8ee8 esp=010ff6e4 ebp=010ff710 iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
ntdll!LdrpDoDebuggerBreak+0x2b:
777e8ee8 cc              int     3
0:000> version
Windows 10 Version 26100 MP (4 procs) Free x86 compatible
Product: Server, suite: TerminalServer DataCenter SingleUserTS
Edition build lab: 26100.1.amd64fre.ge_release.240331-1435
Debug session time: Sat Aug  1 13:27:07.738 2026 (UTC + 0:00)
System Uptime: 0 days 2:13:45.213
Process Uptime: 0 days 0:00:00.134
  Kernel time: 0 days 0:00:00.015
  User time: 0 days 0:00:00.015
Live user mode: <Local>

Microsoft (R) Windows Debugger Version 10.0.26100.8249 X86
Copyright (c) Microsoft Corporation. All rights reserved.

command line: '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\cdb.exe" -lines -cf D:\a\rust\rust\build\i686-pc-windows-msvc\test\debuginfo\msvc-scalarpair-params.cdb\msvc-scalarpair-params.debugger.script D:\a\rust\rust\build\i686-pc-windows-msvc\test\debuginfo\msvc-scalarpair-params.cdb\a.exe'  Debugger Process 0xD5C 
dbgeng:  image 10.0.26100.8249, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\dbgeng.dll]
dbghelp: image 10.0.26100.8249, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\dbghelp.dll]
        DIA version: 33145
Extension DLL search Path:
    C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\WINXP;C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\winext;C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\winext\arcade;C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\pri;C:\Program Files (x86)\Windows Kits\10\Debuggers\x86;C:\Users\runneradmin\AppData\Local\Dbg\EngineExtensions32;C:\Program Files (x86)\Windows Kits\10\Debuggers\x86;D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\lib\rustlib\i686-pc-windows-msvc\lib;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\x86;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.11\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\x86
Extension DLL chain:
    wow64exts: image 10.0.26100.8249, API 1.0.0, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\WINXP\wow64exts.dll]
    dbghelp: image 10.0.26100.8249, API 10.0.6, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\dbghelp.dll]
    exts: image 10.0.26100.8249, API 1.0.0, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\WINXP\exts.dll]
    uext: image 10.0.26100.8249, API 1.0.0, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\winext\uext.dll]
    ntsdexts: image 10.0.26100.8249, API 1.0.0, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\WINXP\ntsdexts.dll]
WOW64 extensions loaded
0:000> .nvlist
Loaded NatVis Files:
    <None Loaded>
0:000> bp `msvc-scalarpair-params.rs:59`
*** WARNING: Unable to verify checksum for a.exe
0:000> bp `msvc-scalarpair-params.rs:71`
0:000> bp `msvc-scalarpair-params.rs:75`
0:000> bp `msvc-scalarpair-params.rs:79`
0:000> bp `msvc-scalarpair-params.rs:83`
0:000> bp `msvc-scalarpair-params.rs:87`
0:000>  g
Breakpoint 0 hit
eax=0000001e ebx=0000000a ecx=00000000 edx=00000014 esi=00000000 edi=0000000c
eip=001d1215 esp=010ffac0 ebp=010ffaec iopl=0         nv up ei pl nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
a!msvc_scalarpair_params::range+0x35:
001d1215 e8b6feffff      call    a!msvc_scalarpair_params::zzz (001d10d0)
0:000>  dx r1
r1               : (0xa..0xc) [Type: core::ops::range::Range<u32>]
    [+0x000] start            : 0xa [Type: unsigned int]
    [+0x004] end              : 0xc [Type: unsigned int]
0:000>  dx r2
r2               : (0x14..0x1e) [Type: core::ops::range::Range<u64>]
    [+0x000] start            : 0x14 [Type: unsigned __int64]
    [+0x008] end              : 0x1e [Type: unsigned __int64]
0:000>  g
Breakpoint 1 hit
eax=00000000 ebx=00000009 ecx=00000000 edx=0000000c esi=00000000 edi=00000014
eip=001d1346 esp=010ffac0 ebp=010ffaec iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
a!msvc_scalarpair_params::range_mut+0x56:
001d1346 e885fdffff      call    a!msvc_scalarpair_params::zzz (001d10d0)
0:000>  dx r1
r1               : (0x9..0x64) [Type: core::ops::range::Range<u32>]
    [+0x000] start            : 0x9 [Type: unsigned int]
    [+0x004] end              : 0x64 [Type: unsigned int]
0:000>  dx r2
r2               : (0xc..0x5a) [Type: core::ops::range::Range<u64>]
    [+0x000] start            : 0xc [Type: unsigned __int64]
    [+0x008] end              : 0x5a [Type: unsigned __int64]
0:000>  g
Breakpoint 2 hit
eax=0000162e ebx=00000001 ecx=00000000 edx=00000001 esi=00000000 edi=000004d2
eip=001d12d5 esp=010ffac0 ebp=010ffaec iopl=0         nv up ei pl nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
a!msvc_scalarpair_params::option+0x35:
001d12d5 e8f6fdffff      call    a!msvc_scalarpair_params::zzz (001d10d0)
0:000>  dx o1
o1               : Some [Type: enum2$<core::option::Option<u32> >]
    [<Raw View>]     [Type: enum2$<core::option::Option<u32> >]
    [+0x004] __0              : 0x4d2 [Type: unsigned int]
0:000>  dx o2
o2               : Some [Type: enum2$<core::option::Option<u64> >]
    [<Raw View>]     [Type: enum2$<core::option::Option<u64> >]
    [+0x008] __0              : 0x162e [Type: unsigned __int64]
0:000>  g
Breakpoint 2 hit
eax=0000162e ebx=00000001 ecx=00000000 edx=00000001 esi=00000000 edi=000004d2
eip=001d12d5 esp=010ffac0 ebp=010ffaec iopl=0         nv up ei pl nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
a!msvc_scalarpair_params::option+0x35:
001d12d5 e8f6fdffff      call    a!msvc_scalarpair_params::zzz (001d10d0)
0:000>  dx t1
Error: Unable to bind name 't1'
0:000>  dx t2
Error: Unable to bind name 't2'
0:000>  g
Breakpoint 3 hit
eax=00000028 ebx=0000000a ecx=00000000 edx=0000001e esi=00000000 edi=00000014
eip=001d1285 esp=010ffac0 ebp=010ffaec iopl=0         nv up ei pl nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
a!msvc_scalarpair_params::tuple+0x35:
001d1285 e846feffff      call    a!msvc_scalarpair_params::zzz (001d10d0)
0:000>  dx s
Error: Unable to bind name 's'
0:000>  g
Breakpoint 4 hit
eax=00000014 ebx=00000001 ecx=001d3100 edx=0000001e esi=010ffb9c edi=001d30e8
eip=001d10c2 esp=010ffae8 ebp=010ffb80 iopl=0         nv up ei pl nz ac pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000216
a!msvc_scalarpair_params::str+0x12:
001d10c2 e809000000      call    a!msvc_scalarpair_params::zzz (001d10d0)
0:000>  dx s
s                : "this is a static str" [Type: ref$<str$>]
    [<Raw View>]     [Type: ref$<str$>]
    [len]            : 0x14 [Type: unsigned int]
    [chars]         
0:000> qq
quit:
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\atlmfc.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\ObjectiveC.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\concurrency.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\cpp_rest.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\stl.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\Windows.Data.Json.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\Windows.Devices.Geolocation.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\Windows.Devices.Sensors.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\Windows.Media.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\windows.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\Visualizers\winrt.natvis'
------------------------------------------
stderr: none

---- [debuginfo-cdb] tests\debuginfo\msvc-scalarpair-params.rs stdout end ----

---
Currently active steps:
test::Debuginfo { test_compiler: Compiler { stage: 2, host: i686-pc-windows-msvc, forced_compiler: false }, target: i686-pc-windows-msvc } at src\bootstrap\src\core\build_steps\test.rs:1914
test::Compiletest { test_compiler: Compiler { stage: 2, host: i686-pc-windows-msvc, forced_compiler: false }, target: i686-pc-windows-msvc, mode: debuginfo, suite: "debuginfo", path: "tests/debuginfo", compare_mode: Some("split-dwarf") } at src\bootstrap\src\core\build_steps\test.rs:1914
Build completed unsuccessfully in 2:04:52
make: *** [Makefile:115: ci-msvc-py] Error 1
  local time: Sat Aug  1 13:27:37 CUT 2026
  network time: Sat, 01 Aug 2026 13:27:42 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-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 Aug 1, 2026
@rust-bors

rust-bors Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 01d8476 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@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 Aug 1, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

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 1, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit a77b919 with merge 35c8302

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/30702559614

rust-bors Bot pushed a commit that referenced this pull request Aug 1, 2026
Rollup of 10 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-*
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 1, 2026
@rust-bors

rust-bors Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 1, 2026
@rust-bors

rust-bors Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

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

Labels

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

10 participants