Skip to content

Rollup of 13 pull requests - #165403

Closed
JonathanBrouwer wants to merge 37 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-QNiNVam
Closed

JonathanBrouwer wants to merge 37 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-QNiNVam

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

yilin0518 and others added 30 commits October 13, 2026 12:59
OpenBSD added getexecpath(3) to libc, which returns an
already-canonicalized executable path directly. Replace the
sysctl(KERN_PROC_ARGV)-based implementation.

This was the last user of div_exact in std, so drop the
exact_div feature gate.
…poll impl instead of the desugared creator function.
It is already rejected on such functions, and keeping it only produced a
redundant 'incompatible with #[cold]' error.
…being allowed

Upstream no longer rejects the combination, so replace the UI test expecting
that error with a codegen test checking that the body coroutine still inherits
the target features.
…cdylib test:

- Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main
  thread TLS destructors on process exit on AIX.
- Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`)
  for `dlopen` on AIX.
- Replace the mode array in `dynamic-loading-cdylib` with a `COMMAND_ARGS`
  constant that selects `load_only` for musl and AIX because `dlclose` does
  not invoke TLS destructors on those platforms.
A comment against PR 151817 mentioned that the test file added in this
PR kept causing "arbitrary" test file changes.

This is because one line of the expanded output sits *just* at 78
columns, which is the pretty-printer's margin. Adding or removing a
symbol shifts every index after it, and when one of those gains or loses
a digit, the wrapping moves.

We cannot use `normalize-stdout` as the layout is decided before
normalization runs.

We fix this by avoiding a strict golden comparison, and instead using a
regex to directly test that the expected syntax contexts exist in the
expanded output.
* Add regression test against rigidity assertion
* Make non-rigid types equal to one another on error reporting
* Bless errors after rigid treatment change
* Remove previously useful crash test!
* Add suggested comments from code review
…ttr, r=saethlin

Make inline attributes apply to the generated `poll` in async fn

This PR adds lowering code (similar to how track_caller forwarding works) to `async fn` items and `async ||` closures such that any inline attributes put on them are inherited by the generated coroutine (corresponding to the `poll()` implementation) and are not applied to the outer function. This behavior matches the accepted FCP in the first linked issue.

Code like the following now correctly codegen 3 functions
- `async_fn_test::consumer`
- `async_fn_test::hi::{closure#0}`
- `core::ptr::drop_in_place::<async_fn_test::hi::{closure#0}>`
```rust
#[inline(never)]
pub async fn hi() -> i32 {
    1337
}

pub fn consumer(cx: &mut Context<'_>) -> Option<i32> {
    let fut = hi();
    let pinned = pin!(fut);
    match pinned.poll(cx) {
        Poll::Ready(value) => Some(value),
        Poll::Pending => None,
    }
}
```

Fixes rust-lang#129347 and fixes rust-lang#106765.

This has already been FCP'ed here: rust-lang#129347
[perf] Reuse CanonicalVarKinds if no new variables were added

Have seen a perf improvement locally.
The idea is to reuse the output of `mk_canonical_var_kinds` if `self.state.var_kinds` is unchanged
…=lcnr

Avoid building a region map when erasing bound regions

In `instantiate_bound_regions_with_erased`, a closure always returns `self.lifetimes.re_erased`, so cache map that `instantiate_bound_regions` creates is unnecessary here.

https://github.com/rust-lang/rust/blob/09026e0fcc8e3c31697db6ce158d8ff8b7df52d0/compiler/rustc_middle/src/ty/fold.rs#L64-L78
…hnTitor

std: Use getexecpath() for current_exe() on OpenBSD

OpenBSD added getexecpath(3) to libc, which returns an
already-canonicalized executable path directly. Replace the
sysctl(KERN_PROC_ARGV)-based implementation.

This was the last user of div_exact in std, so drop the
exact_div feature gate.
…r=GuillaumeGomez

Reenable some cg_gcc tests that were disabled
…rtdev

Don't use `llvm_type` as the type of `static`s.

This PR replaces the two uses of `llvm_type` as the type of `static`s - only the size of the static matters, so `cx.type_array(cx.type_i8(), layout.size)` is sufficient. As `static`s have to be redefined if the initialiser type is not the same as the existing type. using an LLVM `i8` array here is more optimal as it means the static type already matches the initializer in cases where the initializer is just plain bytes.

r? @folkertdev
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc A-thread Area: `std::thread` 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-infra Relevant to the infrastructure 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Nov 3, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

📌 Commit de0ed49 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 Nov 3, 2026
@rust-bors

This comment has been minimized.

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

Rollup of 13 pull requests

Successful merges:

 - #149245 (Make inline attributes apply to the generated `poll` in async fn)
 - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added)
 - #165109 (Avoid building a region map when erasing bound regions)
 - #163393 (std: Use getexecpath() for current_exe() on OpenBSD)
 - #165358 (Reenable some cg_gcc tests that were disabled)
 - #165371 (Don't use `llvm_type` as the type of `static`s.)
 - #162232 (Replace `builtin #` with `k#`)
 - #162608 (Avoid oscillating line wrapping due to symbol indices)
 - #164241 (make the safety documentation consistent in Ptr module)
 - #165029 (Use `MalformedLintAttributeInput` in more places)
 - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test)
 - #165230 (Fix rigidity assertion ICE)
 - #165374 (Refactorings in preparation for the move trait)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-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)

---- [codegen] tests\codegen-llvm\dllimports\main.rs stdout ----
------FileCheck.exe stdout------------------------------

------FileCheck.exe stderr------------------------------
C:\a\rust\rust\tests\codegen-llvm\dllimports\main.rs:13:11: error: CHECK: expected string not found in input
// CHECK: @dylib_global1 = external dllimport local_unnamed_addr global i32
          ^
C:\a\rust\rust\build\aarch64-pc-windows-msvc\test\codegen-llvm\dllimports\main\main.ll:1:1: note: scanning from here
; ModuleID = 'main.d17f5fbe6225cf88-cgu.0'
^
C:\a\rust\rust\build\aarch64-pc-windows-msvc\test\codegen-llvm\dllimports\main\main.ll:7:1: note: possible intended match here
@dylib_global1 = external dllimport local_unnamed_addr global [4 x i8]
^

Input file: C:\a\rust\rust\build\aarch64-pc-windows-msvc\test\codegen-llvm\dllimports\main\main.ll
Check file: C:\a\rust\rust\tests\codegen-llvm\dllimports\main.rs

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

Input was:
<<<<<<
            1: ; ModuleID = 'main.d17f5fbe6225cf88-cgu.0' 
check:13'0    {                                             search range start (exclusive)
check:13'1                                                  error: no match found in search range
            2: source_filename = "main.d17f5fbe6225cf88-cgu.0" 
            3: target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-p:64:64-i32:32-i64:64-i128:128-n32:64-S128-Fn32" 
            4: target triple = "aarch64-pc-windows-msvc" 
            5:  
            6: @vtable.0 = private unnamed_addr constant <{ [24 x i8], ptr, ptr, ptr }> <{ [24 x i8] c"\00\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00", ptr @_RNSNvYNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0INtNtNtCs2IwPxNoKqOJ_4core3ops8function6FnOnceuE9call_once6vtableCshZ9kMv8z9bM_4main, ptr @_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main, ptr @_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main }>, align 8, !guid !0 
            7: @dylib_global1 = external dllimport local_unnamed_addr global [4 x i8] 
check:13'2     ?                                                                        possible intended match
            8: @dylib_global2 = external dllimport local_unnamed_addr global [4 x i8] 
            9: @static_global1 = external local_unnamed_addr global [4 x i8] 
           10: @static_global2 = external local_unnamed_addr global [4 x i8] 
           11:  
           12: ; std::rt::lang_start::<()> 
           13: ; Function Attrs: uwtable 
           14: define hidden noundef i64 @_RINvNtCshBCrcnb0TPX_3std2rt10lang_startuECshZ9kMv8z9bM_4main(ptr noundef nonnull %main, i64 noundef %argc, ptr noundef %argv, i8 noundef %sigpipe) unnamed_addr #0 !guid !6 { 
           15: start: 
           16:  %_7 = alloca [8 x i8], align 8 
           17:  call void @llvm.lifetime.start.p0(ptr nonnull %_7) 
           18:  store ptr %main, ptr %_7, align 8 
           19: ; call std::rt::lang_start_internal 
           20:  %_0 = call noundef i64 @_RNvNtCshBCrcnb0TPX_3std2rt19lang_start_internal(ptr noundef nonnull %_7, ptr noalias nofree noundef readonly align 8 captures(address, read_provenance) dereferenceable(48) @vtable.0, i64 noundef %argc, ptr noundef %argv, i8 noundef %sigpipe) 
           21:  call void @llvm.lifetime.end.p0(ptr nonnull %_7) 
           22:  ret i64 %_0 
           23: } 
           24:  
           25: ; std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> 
           26: ; Function Attrs: noinline uwtable 
           27: define internal fastcc void @_RINvNtNtCshBCrcnb0TPX_3std3sys9backtrace28___rust_begin_short_backtraceFEuuECshZ9kMv8z9bM_4main(ptr nofree noundef nonnull readonly captures(none) %f) unnamed_addr #1 !guid !7 { 
           28: start: 
           29:  tail call void %f(), !inline_history !8 
           30:  tail call void asm sideeffect "", "~{memory}"() #7, !srcloc !9 
           31:  ret void 
           32: } 
           33:  
           34: ; std::rt::lang_start::<()>::{closure#0} 
           35: ; Function Attrs: inlinehint uwtable 
           36: define internal noundef i32 @_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main(ptr noalias nofree noundef readonly align 8 captures(none) dereferenceable(8) %_1) unnamed_addr #2 !guid !10 { 
           37: start: 
           38:  %_4 = load ptr, ptr %_1, align 8, !nonnull !11, !noundef !11 
           39: ; call std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> 
           40:  tail call fastcc void @_RINvNtNtCshBCrcnb0TPX_3std3sys9backtrace28___rust_begin_short_backtraceFEuuECshZ9kMv8z9bM_4main(ptr noundef nonnull %_4) 
           41:  ret i32 0 
           42: } 
           43:  
           44: ; <std::rt::lang_start<()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 
           45: ; Function Attrs: inlinehint uwtable 
           46: define internal noundef i32 @_RNSNvYNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0INtNtNtCs2IwPxNoKqOJ_4core3ops8function6FnOnceuE9call_once6vtableCshZ9kMv8z9bM_4main(ptr nofree noundef readonly captures(none) %_1) unnamed_addr #2 personality ptr @__CxxFrameHandler3 !guid !12 { 
           47: start: 
           48:  %0 = load ptr, ptr %_1, align 8, !nonnull !11, !noundef !11 
           49: ; call std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> 
           50:  tail call fastcc void @_RINvNtNtCshBCrcnb0TPX_3std3sys9backtrace28___rust_begin_short_backtraceFEuuECshZ9kMv8z9bM_4main(ptr noundef nonnull readonly %0), !noalias !13 
           51:  ret i32 0 
           52: } 
           53:  
           54: ; main::main 
           55: ; Function Attrs: nounwind uwtable 
           56: define hidden void @_RNvCshZ9kMv8z9bM_4main4main() unnamed_addr #3 !guid !16 { 
           57: start: 
           58:  %_2 = load i32, ptr @dylib_global1, align 4, !noundef !11 
           59:  %_1 = tail call noundef i32 @dylib_func1(i32 noundef %_2) #7 
           60:  %_5 = load i32, ptr @dylib_global2, align 4, !noundef !11 
           61:  %_4 = tail call noundef i32 @dylib_func2(i32 noundef %_5) #7 
           62:  %_8 = load i32, ptr @static_global1, align 4, !noundef !11 
           63:  %_7 = tail call noundef i32 @static_func1(i32 noundef %_8) #7 
           64:  %_11 = load i32, ptr @static_global2, align 4, !noundef !11 
           65:  %_10 = tail call noundef i32 @static_func2(i32 noundef %_11) #7 
           66:  ret void 
           67: } 
           68:  
           69: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
           70: declare void @llvm.lifetime.start.p0(ptr captures(none)) #4 
           71:  
           72: ; std::rt::lang_start_internal 
           73: ; Function Attrs: uwtable 
           74: declare noundef i64 @_RNvNtCshBCrcnb0TPX_3std2rt19lang_start_internal(ptr noundef nonnull, ptr noalias nofree noundef readonly align 8 captures(address, read_provenance) dereferenceable(48), i64 noundef, ptr noundef, i8 noundef) unnamed_addr #0 
           75:  
           76: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
           77: declare void @llvm.lifetime.end.p0(ptr captures(none)) #4 
           78:  
           79: declare i32 @__CxxFrameHandler3(...) unnamed_addr #5 
           80:  
           81: ; Function Attrs: nounwind uwtable 
           82: declare dllimport noundef i32 @dylib_func1(i32 noundef) unnamed_addr #3 
           83:  
           84: ; Function Attrs: nounwind uwtable 
           85: declare dllimport noundef i32 @dylib_func2(i32 noundef) unnamed_addr #3 
           86:  
           87: ; Function Attrs: nounwind uwtable 
           88: declare noundef i32 @static_func1(i32 noundef) unnamed_addr #3 
           89:  
           90: ; Function Attrs: nounwind uwtable 
           91: declare noundef i32 @static_func2(i32 noundef) unnamed_addr #3 
           92:  
           93: define noundef i32 @main(i32 %0, ptr %1) unnamed_addr #6 !guid !17 { 
           94: top: 
           95:  %_7.i = alloca [8 x i8], align 8 
           96:  %2 = sext i32 %0 to i64 
           97:  call void @llvm.lifetime.start.p0(ptr nonnull %_7.i) 
           98:  store ptr @_RNvCshZ9kMv8z9bM_4main4main, ptr %_7.i, align 8 
           99: ; call std::rt::lang_start_internal 
          100:  %_0.i = call noundef i64 @_RNvNtCshBCrcnb0TPX_3std2rt19lang_start_internal(ptr noundef nonnull %_7.i, ptr noalias nofree noundef readonly align 8 captures(address, read_provenance) dereferenceable(48) @vtable.0, i64 noundef %2, ptr noundef %1, i8 noundef 0) 
          101:  call void @llvm.lifetime.end.p0(ptr nonnull %_7.i) 
          102:  %3 = trunc i64 %_0.i to i32 
          103:  ret i32 %3 
          104: } 
          105:  
          106: attributes #0 = { uwtable "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          107: attributes #1 = { noinline uwtable "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          108: attributes #2 = { inlinehint uwtable "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          109: attributes #3 = { nounwind uwtable "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          110: attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 
          111: attributes #5 = { "target-cpu"="generic" } 
          112: attributes #6 = { "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          113: attributes #7 = { nounwind } 
          114:  
          115: !llvm.module.flags = !{!1, !2, !3, !4} 
          116: !llvm.ident = !{!5} 
          117:  
          118: !0 = !{i64 -472915810382075587} 
          119: !1 = !{i32 8, !"PIC Level", i32 2} 
          120: !2 = !{i32 7, !"PIE Level", i32 2} 
          121: !3 = !{i32 7, !"uwtable", i32 2} 
          122: !4 = !{i32 7, !"frame-pointer", i32 1} 
          123: !5 = !{!"rustc version 1.101.0-nightly (44ff722d8 2026-11-03)"} 
          124: !6 = !{i64 -764599723734115924} 
          125: !7 = !{i64 5073663038847790699} 
          126: !8 = distinct !{null} 
          127: !9 = !{i64 2853503257682716} 
          128: !10 = !{i64 419964832410847678} 
          129: !11 = !{} 
          130: !12 = !{i64 -7770578525776199030} 
          131: !13 = !{!14} 
          132: !14 = distinct !{!14, !15, !"_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main: %_1"} 
          133: !15 = distinct !{!15, !"_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main"} 
          134: !16 = !{i64 -983706141039860288} 
          135: !17 = !{i64 -2624081020897602054} 
check:13'3                                       } search range end (exclusive)
>>>>>>

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

error: verification with 'FileCheck' failed
status: exit code: 1
command: PATH=";C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\bin\HostARM64\arm64;C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\bin\HostARM64\arm64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\arm64;C:\Program Files (x86)\Windows Kits\10\bin\arm64;C:\Program Files\Git\clangarm64\bin;C:\Program Files\Git\usr\bin;C:\Users\runneradmin\bin;C:\a\rust\rust\ninja;C:\a\rust\rust\citools\clang-rust\bin;C:\a\rust\rust\sccache;C:\aliyun-cli;C:\vcpkg;C:\tools\zstd;C:\Program Files (x86)\NSIS;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\3.11.1\x64;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.4\bin;C:\Program Files (x86)\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\arm64\bin;C:\hostedtoolcache\windows\Python\3.13.17\arm64\Scripts;C:\hostedtoolcache\windows\Python\3.13.17\arm64;C:\hostedtoolcache\windows\Ruby\3.4.12\aarch64\bin;C:\Program Files\LLVM\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\21.0.12-101.0\aarch64\bin;C:\Tools\Ninja;C:\Program Files (x86)\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\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:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.16\bin;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\clangarm64\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:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "C:\\a\\rust\\rust\\build\\aarch64-pc-windows-msvc\\llvm\\bin\\FileCheck.exe" "--input-file" "C:\\a\\rust\\rust\\build\\aarch64-pc-windows-msvc\\test\\codegen-llvm\\dllimports\\main\\main.ll" "C:\\a\\rust\\rust\\tests\\codegen-llvm\\dllimports\\main.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
C:\a\rust\rust\tests\codegen-llvm\dllimports\main.rs:13:11: error: CHECK: expected string not found in input
// CHECK: @dylib_global1 = external dllimport local_unnamed_addr global i32
          ^
C:\a\rust\rust\build\aarch64-pc-windows-msvc\test\codegen-llvm\dllimports\main\main.ll:1:1: note: scanning from here
; ModuleID = 'main.d17f5fbe6225cf88-cgu.0'
^
C:\a\rust\rust\build\aarch64-pc-windows-msvc\test\codegen-llvm\dllimports\main\main.ll:7:1: note: possible intended match here
@dylib_global1 = external dllimport local_unnamed_addr global [4 x i8]
^

Input file: C:\a\rust\rust\build\aarch64-pc-windows-msvc\test\codegen-llvm\dllimports\main\main.ll
Check file: C:\a\rust\rust\tests\codegen-llvm\dllimports\main.rs

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

Input was:
<<<<<<
            1: ; ModuleID = 'main.d17f5fbe6225cf88-cgu.0' 
check:13'0    {                                             search range start (exclusive)
check:13'1                                                  error: no match found in search range
            2: source_filename = "main.d17f5fbe6225cf88-cgu.0" 
            3: target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-p:64:64-i32:32-i64:64-i128:128-n32:64-S128-Fn32" 
            4: target triple = "aarch64-pc-windows-msvc" 
            5:  
            6: @vtable.0 = private unnamed_addr constant <{ [24 x i8], ptr, ptr, ptr }> <{ [24 x i8] c"\00\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00", ptr @_RNSNvYNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0INtNtNtCs2IwPxNoKqOJ_4core3ops8function6FnOnceuE9call_once6vtableCshZ9kMv8z9bM_4main, ptr @_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main, ptr @_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main }>, align 8, !guid !0 
            7: @dylib_global1 = external dllimport local_unnamed_addr global [4 x i8] 
check:13'2     ?                                                                        possible intended match
            8: @dylib_global2 = external dllimport local_unnamed_addr global [4 x i8] 
            9: @static_global1 = external local_unnamed_addr global [4 x i8] 
           10: @static_global2 = external local_unnamed_addr global [4 x i8] 
           11:  
           12: ; std::rt::lang_start::<()> 
           13: ; Function Attrs: uwtable 
           14: define hidden noundef i64 @_RINvNtCshBCrcnb0TPX_3std2rt10lang_startuECshZ9kMv8z9bM_4main(ptr noundef nonnull %main, i64 noundef %argc, ptr noundef %argv, i8 noundef %sigpipe) unnamed_addr #0 !guid !6 { 
           15: start: 
           16:  %_7 = alloca [8 x i8], align 8 
           17:  call void @llvm.lifetime.start.p0(ptr nonnull %_7) 
           18:  store ptr %main, ptr %_7, align 8 
           19: ; call std::rt::lang_start_internal 
           20:  %_0 = call noundef i64 @_RNvNtCshBCrcnb0TPX_3std2rt19lang_start_internal(ptr noundef nonnull %_7, ptr noalias nofree noundef readonly align 8 captures(address, read_provenance) dereferenceable(48) @vtable.0, i64 noundef %argc, ptr noundef %argv, i8 noundef %sigpipe) 
           21:  call void @llvm.lifetime.end.p0(ptr nonnull %_7) 
           22:  ret i64 %_0 
           23: } 
           24:  
           25: ; std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> 
           26: ; Function Attrs: noinline uwtable 
           27: define internal fastcc void @_RINvNtNtCshBCrcnb0TPX_3std3sys9backtrace28___rust_begin_short_backtraceFEuuECshZ9kMv8z9bM_4main(ptr nofree noundef nonnull readonly captures(none) %f) unnamed_addr #1 !guid !7 { 
           28: start: 
           29:  tail call void %f(), !inline_history !8 
           30:  tail call void asm sideeffect "", "~{memory}"() #7, !srcloc !9 
           31:  ret void 
           32: } 
           33:  
           34: ; std::rt::lang_start::<()>::{closure#0} 
           35: ; Function Attrs: inlinehint uwtable 
           36: define internal noundef i32 @_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main(ptr noalias nofree noundef readonly align 8 captures(none) dereferenceable(8) %_1) unnamed_addr #2 !guid !10 { 
           37: start: 
           38:  %_4 = load ptr, ptr %_1, align 8, !nonnull !11, !noundef !11 
           39: ; call std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> 
           40:  tail call fastcc void @_RINvNtNtCshBCrcnb0TPX_3std3sys9backtrace28___rust_begin_short_backtraceFEuuECshZ9kMv8z9bM_4main(ptr noundef nonnull %_4) 
           41:  ret i32 0 
           42: } 
           43:  
           44: ; <std::rt::lang_start<()>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 
           45: ; Function Attrs: inlinehint uwtable 
           46: define internal noundef i32 @_RNSNvYNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0INtNtNtCs2IwPxNoKqOJ_4core3ops8function6FnOnceuE9call_once6vtableCshZ9kMv8z9bM_4main(ptr nofree noundef readonly captures(none) %_1) unnamed_addr #2 personality ptr @__CxxFrameHandler3 !guid !12 { 
           47: start: 
           48:  %0 = load ptr, ptr %_1, align 8, !nonnull !11, !noundef !11 
           49: ; call std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> 
           50:  tail call fastcc void @_RINvNtNtCshBCrcnb0TPX_3std3sys9backtrace28___rust_begin_short_backtraceFEuuECshZ9kMv8z9bM_4main(ptr noundef nonnull readonly %0), !noalias !13 
           51:  ret i32 0 
           52: } 
           53:  
           54: ; main::main 
           55: ; Function Attrs: nounwind uwtable 
           56: define hidden void @_RNvCshZ9kMv8z9bM_4main4main() unnamed_addr #3 !guid !16 { 
           57: start: 
           58:  %_2 = load i32, ptr @dylib_global1, align 4, !noundef !11 
           59:  %_1 = tail call noundef i32 @dylib_func1(i32 noundef %_2) #7 
           60:  %_5 = load i32, ptr @dylib_global2, align 4, !noundef !11 
           61:  %_4 = tail call noundef i32 @dylib_func2(i32 noundef %_5) #7 
           62:  %_8 = load i32, ptr @static_global1, align 4, !noundef !11 
           63:  %_7 = tail call noundef i32 @static_func1(i32 noundef %_8) #7 
           64:  %_11 = load i32, ptr @static_global2, align 4, !noundef !11 
           65:  %_10 = tail call noundef i32 @static_func2(i32 noundef %_11) #7 
           66:  ret void 
           67: } 
           68:  
           69: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
           70: declare void @llvm.lifetime.start.p0(ptr captures(none)) #4 
           71:  
           72: ; std::rt::lang_start_internal 
           73: ; Function Attrs: uwtable 
           74: declare noundef i64 @_RNvNtCshBCrcnb0TPX_3std2rt19lang_start_internal(ptr noundef nonnull, ptr noalias nofree noundef readonly align 8 captures(address, read_provenance) dereferenceable(48), i64 noundef, ptr noundef, i8 noundef) unnamed_addr #0 
           75:  
           76: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
           77: declare void @llvm.lifetime.end.p0(ptr captures(none)) #4 
           78:  
           79: declare i32 @__CxxFrameHandler3(...) unnamed_addr #5 
           80:  
           81: ; Function Attrs: nounwind uwtable 
           82: declare dllimport noundef i32 @dylib_func1(i32 noundef) unnamed_addr #3 
           83:  
           84: ; Function Attrs: nounwind uwtable 
           85: declare dllimport noundef i32 @dylib_func2(i32 noundef) unnamed_addr #3 
           86:  
           87: ; Function Attrs: nounwind uwtable 
           88: declare noundef i32 @static_func1(i32 noundef) unnamed_addr #3 
           89:  
           90: ; Function Attrs: nounwind uwtable 
           91: declare noundef i32 @static_func2(i32 noundef) unnamed_addr #3 
           92:  
           93: define noundef i32 @main(i32 %0, ptr %1) unnamed_addr #6 !guid !17 { 
           94: top: 
           95:  %_7.i = alloca [8 x i8], align 8 
           96:  %2 = sext i32 %0 to i64 
           97:  call void @llvm.lifetime.start.p0(ptr nonnull %_7.i) 
           98:  store ptr @_RNvCshZ9kMv8z9bM_4main4main, ptr %_7.i, align 8 
           99: ; call std::rt::lang_start_internal 
          100:  %_0.i = call noundef i64 @_RNvNtCshBCrcnb0TPX_3std2rt19lang_start_internal(ptr noundef nonnull %_7.i, ptr noalias nofree noundef readonly align 8 captures(address, read_provenance) dereferenceable(48) @vtable.0, i64 noundef %2, ptr noundef %1, i8 noundef 0) 
          101:  call void @llvm.lifetime.end.p0(ptr nonnull %_7.i) 
          102:  %3 = trunc i64 %_0.i to i32 
          103:  ret i32 %3 
          104: } 
          105:  
          106: attributes #0 = { uwtable "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          107: attributes #1 = { noinline uwtable "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          108: attributes #2 = { inlinehint uwtable "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          109: attributes #3 = { nounwind uwtable "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          110: attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 
          111: attributes #5 = { "target-cpu"="generic" } 
          112: attributes #6 = { "frame-pointer"="non-leaf" "target-cpu"="generic" "target-features"="+v8a,+neon,+fp-armv8" } 
          113: attributes #7 = { nounwind } 
          114:  
          115: !llvm.module.flags = !{!1, !2, !3, !4} 
          116: !llvm.ident = !{!5} 
          117:  
          118: !0 = !{i64 -472915810382075587} 
          119: !1 = !{i32 8, !"PIC Level", i32 2} 
          120: !2 = !{i32 7, !"PIE Level", i32 2} 
          121: !3 = !{i32 7, !"uwtable", i32 2} 
          122: !4 = !{i32 7, !"frame-pointer", i32 1} 
          123: !5 = !{!"rustc version 1.101.0-nightly (44ff722d8 2026-11-03)"} 
          124: !6 = !{i64 -764599723734115924} 
          125: !7 = !{i64 5073663038847790699} 
          126: !8 = distinct !{null} 
          127: !9 = !{i64 2853503257682716} 
          128: !10 = !{i64 419964832410847678} 
          129: !11 = !{} 
          130: !12 = !{i64 -7770578525776199030} 
          131: !13 = !{!14} 
          132: !14 = distinct !{!14, !15, !"_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main: %_1"} 
          133: !15 = distinct !{!15, !"_RNCINvNtCshBCrcnb0TPX_3std2rt10lang_startuE0CshZ9kMv8z9bM_4main"} 
          134: !16 = !{i64 -983706141039860288} 
          135: !17 = !{i64 -2624081020897602054} 
check:13'3                                       } search range end (exclusive)
>>>>>>
------------------------------------------

---- [codegen] tests\codegen-llvm\dllimports\main.rs stdout end ----

---
Currently active steps:
test::CodegenLlvm { test_compiler: Compiler { stage: 2, host: aarch64-pc-windows-msvc, forced_compiler: false }, target: aarch64-pc-windows-msvc } at src\bootstrap\src\core\build_steps\test.rs:2041
test::Compiletest { test_compiler: Compiler { stage: 2, host: aarch64-pc-windows-msvc, forced_compiler: false }, target: aarch64-pc-windows-msvc, mode: codegen, suite: "codegen-llvm", path: "tests/codegen-llvm", compare_mode: None } at src\bootstrap\src\core\build_steps\test.rs:2041
Build completed unsuccessfully in 1:18:22
make: *** [Makefile:115: ci-msvc-py] Error 1
  local time: Tue Nov  3 06:04:22 PST 2026
  network time: Tue, 03 Nov 2026 14:04:21 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 Nov 3, 2026
@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 44ff722 failed: CI. Failed job:

@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-review Status: Awaiting review from the assignee but also interested parties. labels Nov 3, 2026
@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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

@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-raw-pointers Area: raw pointers, MaybeUninit, NonNull A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-thread Area: `std::thread` rollup A PR which is a rollup T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. 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.