Skip to content

Conversation

@matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Dec 4, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

chenyukang and others added 30 commits November 21, 2025 12:19
For half-open ranges, specifies that the upper bound cannot be the minimum.

Also specify that this only applies to range patterns and not also expressions.
This reduces check times for miri from 2m15s to 20s. And reduces check
times for miri with --compile-time-deps from 1m50s to 7s. This makes
rust-analyzer start a lot faster after switching branches.
…ngjubilee

Rework `c_variadic`

tracking issue: rust-lang#44930
related PR: rust-lang#144529

On some platforms, the C `va_list` type is actually a single-element array of a struct (on other platforms it is just a pointer). In C, arrays passed as function arguments expirience array-to-pointer decay, which means that C will pass a pointer to the array in the caller instead of the array itself, and modifications to the array in the callee will be visible to the caller (this does not match Rust by-value semantics). However, for `va_list`, the C standard explicitly states that it is undefined behaviour to use a `va_list` after it has been passed by value to a function (in Rust parlance, the `va_list` is moved, not copied). This matches Rust's pass-by-value semantics, meaning that when the C `va_list` type is a single-element array of a struct, the ABI will match C as long as the Rust type is always be passed indirectly.

In the old implementation, this ABI was achieved by having two separate types: `VaList` was the type that needed to be used when passing a `VaList` as a function parameter, whereas `VaListImpl` was the actual `va_list` type that was correct everywhere else. This however is quite confusing, as there are lots of footguns: it is easy to cause bugs by mixing them up (e.g. the C function `void foo(va_list va)` was equivalent to the Rust `fn foo(va: VaList)` whereas the C function `void bar(va_list* va)` was equivalent to the Rust `fn foo(va: *mut VaListImpl)`, not `fn foo(va: *mut VaList)` as might be expected); also converting from `VaListImpl` to `VaList` with `as_va_list()` had platform specific behaviour: on single-element array of a struct platforms it would return a `VaList` referencing the original `VaListImpl`, whereas on other platforms it would return a cioy,

In this PR, there is now just a single `VaList` type (renamed from `VaListImpl`) which represents the C `va_list` type and will just work in all positions. Instead of having a separate type just to make the ABI work, rust-lang#144529 adds a `#[rustc_pass_indirectly_in_non_rustic_abis]` attribute, which when applied to a struct will force the struct to be passed indirectly by non-Rustic calling conventions. This PR then implements the `VaList` rework, making use of the new attribute on all platforms where the C `va_list` type is a single-element array of a struct.

Cleanup of the `VaList` API and implementation is also included in this PR: since it was decided it was OK to experiment with Rust requiring that not calling `va_end` is not undefined behaviour (rust-lang#141524 (comment)), I've removed the `with_copy` method as it was redundant to the `Clone` impl (the `Drop` impl of `VaList` is a no-op as `va_end` is a no-op on all known platforms).

Previous discussion: rust-lang#141524 and [t-compiler > c_variadic API and ABI](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/c_variadic.20API.20and.20ABI)
Tracking issue: rust-lang#44930
r? ```@joshtriplett```
…flelapkin

Fix ICE when applying test macro to crate root

This PR does a couple of things. First of all, I found [an ICE](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=a733a7f3d223e1a9712e44b571f3e5cf) that happens when applying `#![core::prelude::v1::test]` to the crate root. This is caused by the test macro not expanding to an item when `--test` isn't applied. For the crate root, that means it deletes the crate....

The fix now first does target checking, and only if the target is valid discards the item when `--test` isn't applied. The discarding is, I think, important for perf.

The problem with this PR is that it means that `#[test]` applied to structs previously would give no errors unless `--test` is applied! That sounds like a bug to me, but maybe we should crater run it just in case, since technically that's a breaking change. Errors in such items wouldn't be reported previously.

 Also fixed a smol diagnostics bug with `#[bench]`'s error messages refering to `#[test]` accidentally.

r? noratrieb (since I already explained you a bunch, feel free to re-assign)

Fixes rust-lang#114920
…nments-macro-gen-147648, r=JonathanBrouwer

Fix unused_assignments false positives from macros

Fixes rust-lang#147648
Use `TypingMode::PostAnalysis` in `try_evaluate_const`

As mentioned in rust-lang#148698 (comment), we should use ``TypingMode::PostAnalysis`` for that path.

```@BoxyUwU``` prefer the match in ``try_evaluate_const`` to be exhaustive, so I also included that in this PR :3
…lacrum

std: don't call `current_os_id` from signal handler

`current_os_id` is not always async-signal-safe depending on the platform, hence it may not be called from the SIGSEGV handler. Instead, store the thread ID along with the thread name during setup. With rust-lang#144465 merged, this information is available even before the thread main function.
…, r=lqd,oli-obk

CTFE: avoid emitting a hard error on generic normalization failures

Fixes rust-lang#149081.

The fix is quite unsatisfying and should not be necessary, cc rust-lang#149283. That change is significantly more involved. This temporary fix introduces some unnecessary complexity and may hide other type system bugs.

cc ```@rust-lang/types``` I think we should try to fix issue rust-lang#149283 in the near future and then remove this hack again.

I originally intended a more targeted fix. I wanted to skip evaluating constants in MIR opts if their body was polymorphic and the current generic arguments still reference generic parameters. Notes from looking into this:
- we only fetch the MIR in the `eval_to_allocation_raw` query
- figuring out which MIR to use is hard
	- dealing with trivial consts is annoying
	- need to resolve instances for associated consts
	- implementing this by hand is hard
- inlining handles this issue by bailing on literally all normalization failures, even the ones that imply an unsoundness
	- `try_normalize_after_erasing_regions` generally does two things
		- deal with ambiguity after inlining
		- deal with error tainting issues (please don't, we should stop doing that)
- CTFE could be changed to always silently ignore normalization failures if we're in a generic body
	- hides actual bugs <- went with this option

r? types
…, r=jieyouxu

reword error for invalid range patterns

For half-open ranges, specifies that the upper bound cannot be the minimum.

Also specify that this only applies to range patterns and not also expressions.

Fixes rust-lang#149165
…ark-Simulacrum

Additional test for uN::{gather,scatter}_bits

Feature gate: #![feature(uint_gather_scatter_bits)]
Tracking issue: rust-lang#149069
Accepted ACP: rust-lang/libs-team#695 (comment)

Adds an additional runtime test for `uN::gather_bits` and `uN::scatter_bits` in coretests. They are each other's inverses in a sense, so a shared test can test both with relative ease.

I plan to follow up with optimized implementations for these functions.
…-ttbr0_el2, r=WaffleLapkin

Regression test for system register `ttbr0_el2`

Regression test for recognising the `ttbr0_el2` register.

closes rust-lang#97724
…=RalfJung

Disable native-lib for x check miri

This reduces check times for miri from 2m15s to 20s. And reduces check times for miri with --compile-time-deps from 1m50s to 7s. This makes rust-analyzer start a lot faster after switching branches.

r? ``@RalfJung``
…=Mark-Simulacrum

build-manifest: generate MSI and MINGW arrays from rustc

An alternative to rust-lang#149503

The arrays after generating:
```
❯ bat -n build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/build/build-manifest-e0236666c7c4187b/out/targets.rs | rg MSI -A14
 136 static MSI_INSTALLERS: &[&str] = &[
 137     "aarch64-pc-windows-gnullvm",
 138     "aarch64-pc-windows-msvc",
 139     "i686-pc-windows-gnu",
 140     "i686-pc-windows-msvc",
 141     "x86_64-pc-windows-gnu",
 142     "x86_64-pc-windows-gnullvm",
 143     "x86_64-pc-windows-msvc",
 144 ];
 145 static MINGW: &[&str] = &[
 146     "aarch64-pc-windows-gnullvm",
 147     "i686-pc-windows-gnu",
 148     "x86_64-pc-windows-gnu",
 149     "x86_64-pc-windows-gnullvm",
 150 ];
```

r? ``@Mark-Simulacrum``
…d, r=workingjubilee

c-variadic: bpf and spirv do not support c-variadic definitions

tracking issue: rust-lang#44930

Emit a nice error message on bpf and spirv targets when a c-variadic function is defined. Spirv also does not support c-variadic calls, bpf appears to allow them.

r? ``@workingjubilee``
Fix mailmap issue

My name and username got separated in thanks.rust-lang.org, probably due to me changing my email in Github about a month ago.
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like 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. rollup A PR which is a rollup labels Dec 4, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Dec 4, 2025

📌 Commit d83d5c1 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors 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 Dec 4, 2025
@matthiaskrgr
Copy link
Member Author

@bors try jobs=x86_64-msvc-1,i686-msvc-1,x86_64-mingw-1,test-various,armhf-gnu,aarch64-apple,x86_64-gnu-llvm-20-3

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 4, 2025
Rollup of 13 pull requests

try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: test-various
try-job: armhf-gnu
try-job: aarch64-apple
try-job: x86_64-gnu-llvm-20-3
@rust-log-analyzer
Copy link
Collaborator

The job armhf-gnu 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/cffi/c-variadic.rs stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/cffi/c-variadic.rs:30:12: error: CHECK: expected string not found in input
 // CHECK: call void ({{.*}}, ...) @foreign_c_variadic_1({{.*}} %0)
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/cffi/c-variadic/c-variadic.ll:160:76: note: scanning from here
 call void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024, i32 0) #15
                                                                           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/cffi/c-variadic/c-variadic.ll:168:2: note: possible intended match here
 call void (ptr, ...) @foreign_c_variadic_1(ptr %ap) #15
 ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/cffi/c-variadic/c-variadic.ll
Check file: /checkout/tests/codegen-llvm/cffi/c-variadic.rs

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

Input was:
<<<<<<
            .
            .
            .
           60: ; Function Attrs: alwaysinline uwtable 
           61: define internal zeroext i1 @_RNvXs1c_NtNtCsfozMkAdPo5N_4core3cmp5implslNtB8_10PartialOrd2lt(ptr align 4 %self, ptr align 4 %other) unnamed_addr #4 { 
           62: start: 
           63:  %_3 = load i32, ptr %self, align 4 
           64:  %_4 = load i32, ptr %other, align 4 
           65:  %_0 = icmp slt i32 %_3, %_4 
           66:  ret i1 %_0 
           67: } 
           68:  
           69: ; <core::ops::range::Range<i32> as core::iter::range::RangeIteratorImpl>::spec_next 
           70: ; Function Attrs: inlinehint uwtable 
           71: define { i32, i32 } @_RNvXs3_NtNtCsfozMkAdPo5N_4core4iter5rangeINtNtNtB9_3ops5range5RangelENtB5_17RangeIteratorImpl9spec_nextCseeVnCcRg8kZ_10c_variadic(ptr align 4 %self) unnamed_addr #0 { 
           72: start: 
           73:  %_0 = alloca [8 x i8], align 4 
           74:  %_4 = getelementptr inbounds i8, ptr %self, i32 4 
           75: ; call <i32 as core::cmp::PartialOrd>::lt 
           76:  %_2 = call zeroext i1 @_RNvXs1c_NtNtCsfozMkAdPo5N_4core3cmp5implslNtB8_10PartialOrd2lt(ptr align 4 %self, ptr align 4 %_4) #12 
           77:  br i1 %_2, label %bb2, label %bb4 
           78:  
           79: bb4: ; preds = %start 
           80:  store i32 0, ptr %_0, align 4 
           81:  br label %bb5 
           82:  
           83: bb2: ; preds = %start 
           84:  %old = load i32, ptr %self, align 4 
           85: ; call <i32 as core::iter::range::Step>::forward_unchecked 
           86:  %_6 = call i32 @_RNvXsC_NtNtCsfozMkAdPo5N_4core4iter5rangelNtB5_4Step17forward_uncheckedCseeVnCcRg8kZ_10c_variadic(i32 %old, i32 1) #13 
           87:  store i32 %_6, ptr %self, align 4 
           88:  %0 = getelementptr inbounds i8, ptr %_0, i32 4 
           89:  store i32 %old, ptr %0, align 4 
           90:  store i32 1, ptr %_0, align 4 
           91:  br label %bb5 
           92:  
           93: bb5: ; preds = %bb2, %bb4 
           94:  %1 = load i32, ptr %_0, align 4 
           95:  %2 = getelementptr inbounds i8, ptr %_0, i32 4 
           96:  %3 = load i32, ptr %2, align 4 
           97:  %4 = insertvalue { i32, i32 } poison, i32 %1, 0 
           98:  %5 = insertvalue { i32, i32 } %4, i32 %3, 1 
           99:  ret { i32, i32 } %5 
          100: } 
          101:  
          102: ; <core::ops::range::Range<i32> as core::iter::traits::iterator::Iterator>::next 
          103: ; Function Attrs: inlinehint uwtable 
          104: define { i32, i32 } @_RNvXs4_NtNtCsfozMkAdPo5N_4core4iter5rangeINtNtNtB9_3ops5range5RangelENtNtNtB7_6traits8iterator8Iterator4nextCseeVnCcRg8kZ_10c_variadic(ptr align 4 %self) unnamed_addr #0 { 
          105: start: 
          106: ; call <core::ops::range::Range<i32> as core::iter::range::RangeIteratorImpl>::spec_next 
          107:  %0 = call { i32, i32 } @_RNvXs3_NtNtCsfozMkAdPo5N_4core4iter5rangeINtNtNtB9_3ops5range5RangelENtB5_17RangeIteratorImpl9spec_nextCseeVnCcRg8kZ_10c_variadic(ptr align 4 %self) #13 
          108:  %_0.0 = extractvalue { i32, i32 } %0, 0 
          109:  %_0.1 = extractvalue { i32, i32 } %0, 1 
          110:  %1 = insertvalue { i32, i32 } poison, i32 %_0.0, 0 
          111:  %2 = insertvalue { i32, i32 } %1, i32 %_0.1, 1 
          112:  ret { i32, i32 } %2 
          113: } 
          114:  
          115: ; <i32 as core::iter::range::Step>::forward_unchecked 
          116: ; Function Attrs: inlinehint uwtable 
          117: define internal i32 @_RNvXsC_NtNtCsfozMkAdPo5N_4core4iter5rangelNtB5_4Step17forward_uncheckedCseeVnCcRg8kZ_10c_variadic(i32 %start1, i32 %n) unnamed_addr #0 { 
          118: start: 
          119:  %self = alloca [8 x i8], align 4 
          120:  %0 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %start1, i32 %n) 
          121:  %_8.0 = extractvalue { i32, i1 } %0, 0 
          122:  %_8.1 = extractvalue { i32, i1 } %0, 1 
          123:  %_10 = icmp slt i32 %n, 0 
          124:  %b = xor i1 %_8.1, %_10 
          125:  br i1 %b, label %bb1, label %bb3 
          126:  
          127: bb3: ; preds = %start 
          128:  %1 = getelementptr inbounds i8, ptr %self, i32 4 
          129:  store i32 %_8.0, ptr %1, align 4 
          130:  store i32 1, ptr %self, align 4 
          131:  %2 = getelementptr inbounds i8, ptr %self, i32 4 
          132:  %val = load i32, ptr %2, align 4 
          133:  ret i32 %val 
          134:  
          135: bb1: ; preds = %start 
          136:  %3 = load i32, ptr @anon.d3dbef1f542bde8aedd530319e4b170c.0, align 4 
          137:  %4 = load i32, ptr getelementptr inbounds (i8, ptr @anon.d3dbef1f542bde8aedd530319e4b170c.0, i32 4), align 4 
          138:  store i32 %3, ptr %self, align 4 
          139:  %5 = getelementptr inbounds i8, ptr %self, i32 4 
          140:  store i32 %4, ptr %5, align 4 
          141: ; call core::hint::unreachable_unchecked::precondition_check 
          142:  call void @_RNvNvNtCsfozMkAdPo5N_4core4hint21unreachable_unchecked18precondition_checkCseeVnCcRg8kZ_10c_variadic(ptr align 4 @alloc_a354fc5ca77020c3c399cd70d9219f28) #14 
          143:  unreachable 
          144: } 
          145:  
          146: ; <core::ffi::va_list::VaList as core::ops::drop::Drop>::drop 
          147: ; Function Attrs: uwtable 
          148: define internal void @_RNvXsa_NtNtCsfozMkAdPo5N_4core3ffi7va_listNtB5_6VaListNtNtNtB9_3ops4drop4Drop4dropCseeVnCcRg8kZ_10c_variadic(ptr align 4 %self) unnamed_addr #1 { 
          149: start: 
          150:  ret void 
          151: } 
          152:  
          153: ; c_variadic::use_foreign_c_variadic_0 
          154: ; Function Attrs: nounwind uwtable 
          155: define void @_RNvCseeVnCcRg8kZ_10c_variadic24use_foreign_c_variadic_0() unnamed_addr #5 { 
          156: start: 
          157:  call void (i32, ...) @foreign_c_variadic_0(i32 0) #15 
          158:  call void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42) #15 
          159:  call void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024) #15 
          160:  call void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024, i32 0) #15 
check:30'0                                                                                X~~~~ error: no match found
          161:  ret void 
check:30'0     ~~~~~~~~~~
          162: } 
check:30'0     ~~
          163:  
check:30'0     ~
          164: ; c_variadic::use_foreign_c_variadic_1_0 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          165: ; Function Attrs: nounwind uwtable 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          166: define void @_RNvCseeVnCcRg8kZ_10c_variadic26use_foreign_c_variadic_1_0(ptr %ap) unnamed_addr #5 { 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          167: start: 
check:30'0     ~~~~~~~
          168:  call void (ptr, ...) @foreign_c_variadic_1(ptr %ap) #15 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:30'1      ?                                                        possible intended match
          169:  ret void 
check:30'0     ~~~~~~~~~~
          170: } 
check:30'0     ~~
          171:  
check:30'0     ~
          172: ; c_variadic::use_foreign_c_variadic_1_1 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          173: ; Function Attrs: nounwind uwtable 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          174: define void @_RNvCseeVnCcRg8kZ_10c_variadic26use_foreign_c_variadic_1_1(ptr %ap) unnamed_addr #5 { 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          175: start: 
check:30'0     ~~~~~~~
          176:  call void (ptr, ...) @foreign_c_variadic_1(ptr %ap, i32 42) #15 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          177:  ret void 
check:30'0     ~~~~~~~~~~
          178: } 
check:30'0     ~~
          179:  
check:30'0     ~
          180: ; c_variadic::use_foreign_c_variadic_1_2 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          181: ; Function Attrs: nounwind uwtable 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          182: define void @_RNvCseeVnCcRg8kZ_10c_variadic26use_foreign_c_variadic_1_2(ptr %ap) unnamed_addr #5 { 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          183: start: 
check:30'0     ~~~~~~~
          184:  call void (ptr, ...) @foreign_c_variadic_1(ptr %ap, i32 2, i32 42) #15 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          185:  ret void 
check:30'0     ~~~~~~~~~~
          186: } 
check:30'0     ~~
          187:  
check:30'0     ~
          188: ; c_variadic::use_foreign_c_variadic_1_3 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          189: ; Function Attrs: nounwind uwtable 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          190: define void @_RNvCseeVnCcRg8kZ_10c_variadic26use_foreign_c_variadic_1_3(ptr %ap) unnamed_addr #5 { 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          191: start: 
check:30'0     ~~~~~~~
          192:  call void (ptr, ...) @foreign_c_variadic_1(ptr %ap, i32 2, i32 42, i32 0) #15 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          193:  ret void 
check:30'0     ~~~~~~~~~~
          194: } 
check:30'0     ~~
          195:  
check:30'0     ~
          196: ; Function Attrs: nounwind uwtable 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          197: define i32 @c_variadic(i32 %n, ...) unnamed_addr #5 personality ptr @rust_eh_personality { 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          198: start: 
check:30'0     ~~~~~~~
          199:  %0 = alloca [8 x i8], align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          200:  %iter = alloca [8 x i8], align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          201:  %sum = alloca [4 x i8], align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          202:  %ap = alloca [4 x i8], align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          203:  call void @llvm.va_start.p0(ptr %ap) 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          204:  store i32 0, ptr %sum, align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          205: ; invoke <core::ops::range::Range<i32> as core::iter::traits::collect::IntoIterator>::into_iter 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          206:  %1 = invoke { i32, i32 } @_RNvXNtNtNtCsfozMkAdPo5N_4core4iter6traits7collectINtNtNtB8_3ops5range5RangelENtB2_12IntoIterator9into_iterCseeVnCcRg8kZ_10c_variadic(i32 0, i32 %n) 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          207:  to label %bb1 unwind label %cleanup 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          208:  
check:30'0     ~
          209: bb9: ; preds = %cleanup 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~
          210: ; invoke core::ptr::drop_in_place::<core::ffi::va_list::VaList> 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          211:  invoke void @_RINvNtCsfozMkAdPo5N_4core3ptr13drop_in_placeNtNtNtB4_3ffi7va_list6VaListECseeVnCcRg8kZ_10c_variadic(ptr align 4 %ap) #16 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          212:  to label %bb10 unwind label %terminate 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          213:  
check:30'0     ~
          214: cleanup: ; preds = %bb5, %bb2, %start 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          215:  %2 = landingpad { ptr, i32 } 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          216:  cleanup 
check:30'0     ~~~~~~~~~
          217:  %3 = extractvalue { ptr, i32 } %2, 0 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          218:  %4 = extractvalue { ptr, i32 } %2, 1 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          219:  store ptr %3, ptr %0, align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          220:  %5 = getelementptr inbounds i8, ptr %0, i32 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          221:  store i32 %4, ptr %5, align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          222:  br label %bb9 
check:30'0     ~~~~~~~~~~~~~~~
          223:  
check:30'0     ~
          224: bb1: ; preds = %start 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~
          225:  %_4.0 = extractvalue { i32, i32 } %1, 0 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          226:  %_4.1 = extractvalue { i32, i32 } %1, 1 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          227:  store i32 %_4.0, ptr %iter, align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          228:  %6 = getelementptr inbounds i8, ptr %iter, i32 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          229:  store i32 %_4.1, ptr %6, align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          230:  br label %bb2 
check:30'0     ~~~~~~~~~~~~~~~
          231:  
check:30'0     ~
          232: bb2: ; preds = %bb7, %bb1 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          233: ; invoke <core::ops::range::Range<i32> as core::iter::traits::iterator::Iterator>::next 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          234:  %7 = invoke { i32, i32 } @_RNvXs4_NtNtCsfozMkAdPo5N_4core4iter5rangeINtNtNtB9_3ops5range5RangelENtNtNtB7_6traits8iterator8Iterator4nextCseeVnCcRg8kZ_10c_variadic(ptr align 4 %iter) 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          235:  to label %bb3 unwind label %cleanup 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          236:  
check:30'0     ~
          237: bb3: ; preds = %bb2 
check:30'0     ~~~~~~~~~~~~~~~~~~~~
          238:  %_7.0 = extractvalue { i32, i32 } %7, 0 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          239:  %_7.1 = extractvalue { i32, i32 } %7, 1 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          240:  %8 = trunc nuw i32 %_7.0 to i1 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          241:  br i1 %8, label %bb5, label %bb6 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          242:  
check:30'0     ~
          243: bb5: ; preds = %bb3 
check:30'0     ~~~~~~~~~~~~~~~~~~~~
          244: ; invoke <core::ffi::va_list::VaList>::arg::<i32> 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          245:  %_10 = invoke i32 @_RINvMs8_NtNtCsfozMkAdPo5N_4core3ffi7va_listNtB6_6VaList3arglECseeVnCcRg8kZ_10c_variadic(ptr align 4 %ap) 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          246:  to label %bb7 unwind label %cleanup 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          247:  
check:30'0     ~
          248: bb6: ; preds = %bb3 
check:30'0     ~~~~~~~~~~~~~~~~~~~~
          249:  %_0 = load i32, ptr %sum, align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          250: ; invoke core::ptr::drop_in_place::<core::ffi::va_list::VaList> 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          251:  invoke void @_RINvNtCsfozMkAdPo5N_4core3ptr13drop_in_placeNtNtNtB4_3ffi7va_list6VaListECseeVnCcRg8kZ_10c_variadic(ptr align 4 %ap) 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          252:  to label %bb8 unwind label %cleanup1 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          253:  
check:30'0     ~
          254: bb10: ; preds = %bb9, %cleanup1 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          255: ; call core::panicking::panic_cannot_unwind 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          256:  call void @_RNvNtCsfozMkAdPo5N_4core9panicking19panic_cannot_unwind() #17 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          257:  unreachable 
check:30'0     ~~~~~~~~~~~~~
          258:  
check:30'0     ~
          259: cleanup1: ; preds = %bb6 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
          260:  %9 = landingpad { ptr, i32 } 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          261:  cleanup 
check:30'0     ~~~~~~~~~
          262:  %10 = extractvalue { ptr, i32 } %9, 0 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          263:  %11 = extractvalue { ptr, i32 } %9, 1 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          264:  store ptr %10, ptr %0, align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          265:  %12 = getelementptr inbounds i8, ptr %0, i32 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          266:  store i32 %11, ptr %12, align 4 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          267:  br label %bb10 
check:30'0     ~~~~~~~~~~~~~~~~
          268:  
check:30'0     ~
            .
            .
            .
>>>>>>

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

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/cffi/c-variadic/c-variadic.ll" "/checkout/tests/codegen-llvm/cffi/c-variadic.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/cffi/c-variadic.rs:30:12: error: CHECK: expected string not found in input
 // CHECK: call void ({{.*}}, ...) @foreign_c_variadic_1({{.*}} %0)
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/cffi/c-variadic/c-variadic.ll:160:76: note: scanning from here
 call void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024, i32 0) #15
                                                                           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/cffi/c-variadic/c-variadic.ll:168:2: note: possible intended match here
 call void (ptr, ...) @foreign_c_variadic_1(ptr %ap) #15
 ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/cffi/c-variadic/c-variadic.ll
Check file: /checkout/tests/codegen-llvm/cffi/c-variadic.rs

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

Input was:
<<<<<<
            .
            .
            .
           60: ; Function Attrs: alwaysinline uwtable 
           61: define internal zeroext i1 @_RNvXs1c_NtNtCsfozMkAdPo5N_4core3cmp5implslNtB8_10PartialOrd2lt(ptr align 4 %self, ptr align 4 %other) unnamed_addr #4 { 
           62: start: 
           63:  %_3 = load i32, ptr %self, align 4 
           64:  %_4 = load i32, ptr %other, align 4 
           65:  %_0 = icmp slt i32 %_3, %_4 
           66:  ret i1 %_0 
           67: } 
           68:  
           69: ; <core::ops::range::Range<i32> as core::iter::range::RangeIteratorImpl>::spec_next 
           70: ; Function Attrs: inlinehint uwtable 
           71: define { i32, i32 } @_RNvXs3_NtNtCsfozMkAdPo5N_4core4iter5rangeINtNtNtB9_3ops5range5RangelENtB5_17RangeIteratorImpl9spec_nextCseeVnCcRg8kZ_10c_variadic(ptr align 4 %self) unnamed_addr #0 { 
           72: start: 
           73:  %_0 = alloca [8 x i8], align 4 
           74:  %_4 = getelementptr inbounds i8, ptr %self, i32 4 
           75: ; call <i32 as core::cmp::PartialOrd>::lt 
           76:  %_2 = call zeroext i1 @_RNvXs1c_NtNtCsfozMkAdPo5N_4core3cmp5implslNtB8_10PartialOrd2lt(ptr align 4 %self, ptr align 4 %_4) #12 
           77:  br i1 %_2, label %bb2, label %bb4 
           78:  
           79: bb4: ; preds = %start 
           80:  store i32 0, ptr %_0, align 4 
           81:  br label %bb5 
           82:  
           83: bb2: ; preds = %start 
           84:  %old = load i32, ptr %self, align 4 
           85: ; call <i32 as core::iter::range::Step>::forward_unchecked 
           86:  %_6 = call i32 @_RNvXsC_NtNtCsfozMkAdPo5N_4core4iter5rangelNtB5_4Step17forward_uncheckedCseeVnCcRg8kZ_10c_variadic(i32 %old, i32 1) #13 
           87:  store i32 %_6, ptr %self, align 4 
           88:  %0 = getelementptr inbounds i8, ptr %_0, i32 4 
           89:  store i32 %old, ptr %0, align 4 
           90:  store i32 1, ptr %_0, align 4 
           91:  br label %bb5 
           92:  
           93: bb5: ; preds = %bb2, %bb4 
           94:  %1 = load i32, ptr %_0, align 4 
           95:  %2 = getelementptr inbounds i8, ptr %_0, i32 4 
           96:  %3 = load i32, ptr %2, align 4 
           97:  %4 = insertvalue { i32, i32 } poison, i32 %1, 0 
           98:  %5 = insertvalue { i32, i32 } %4, i32 %3, 1 
           99:  ret { i32, i32 } %5 
          100: } 
          101:  
          102: ; <core::ops::range::Range<i32> as core::iter::traits::iterator::Iterator>::next 
          103: ; Function Attrs: inlinehint uwtable 
          104: define { i32, i32 } @_RNvXs4_NtNtCsfozMkAdPo5N_4core4iter5rangeINtNtNtB9_3ops5range5RangelENtNtNtB7_6traits8iterator8Iterator4nextCseeVnCcRg8kZ_10c_variadic(ptr align 4 %self) unnamed_addr #0 { 
          105: start: 
          106: ; call <core::ops::range::Range<i32> as core::iter::range::RangeIteratorImpl>::spec_next 
          107:  %0 = call { i32, i32 } @_RNvXs3_NtNtCsfozMkAdPo5N_4core4iter5rangeINtNtNtB9_3ops5range5RangelENtB5_17RangeIteratorImpl9spec_nextCseeVnCcRg8kZ_10c_variadic(ptr align 4 %self) #13 
          108:  %_0.0 = extractvalue { i32, i32 } %0, 0 
          109:  %_0.1 = extractvalue { i32, i32 } %0, 1 
          110:  %1 = insertvalue { i32, i32 } poison, i32 %_0.0, 0 
          111:  %2 = insertvalue { i32, i32 } %1, i32 %_0.1, 1 
          112:  ret { i32, i32 } %2 
          113: } 
          114:  
          115: ; <i32 as core::iter::range::Step>::forward_unchecked 
          116: ; Function Attrs: inlinehint uwtable 
          117: define internal i32 @_RNvXsC_NtNtCsfozMkAdPo5N_4core4iter5rangelNtB5_4Step17forward_uncheckedCseeVnCcRg8kZ_10c_variadic(i32 %start1, i32 %n) unnamed_addr #0 { 
          118: start: 
          119:  %self = alloca [8 x i8], align 4 
          120:  %0 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %start1, i32 %n) 
          121:  %_8.0 = extractvalue { i32, i1 } %0, 0 
          122:  %_8.1 = extractvalue { i32, i1 } %0, 1 
          123:  %_10 = icmp slt i32 %n, 0 
          124:  %b = xor i1 %_8.1, %_10 
          125:  br i1 %b, label %bb1, label %bb3 
          126:  
          127: bb3: ; preds = %start 
          128:  %1 = getelementptr inbounds i8, ptr %self, i32 4 
          129:  store i32 %_8.0, ptr %1, align 4 
          130:  store i32 1, ptr %self, align 4 
          131:  %2 = getelementptr inbounds i8, ptr %self, i32 4 
          132:  %val = load i32, ptr %2, align 4 
          133:  ret i32 %val 
          134:  
          135: bb1: ; preds = %start 
          136:  %3 = load i32, ptr @anon.d3dbef1f542bde8aedd530319e4b170c.0, align 4 
          137:  %4 = load i32, ptr getelementptr inbounds (i8, ptr @anon.d3dbef1f542bde8aedd530319e4b170c.0, i32 4), align 4 
          138:  store i32 %3, ptr %self, align 4 
          139:  %5 = getelementptr inbounds i8, ptr %self, i32 4 
          140:  store i32 %4, ptr %5, align 4 
          141: ; call core::hint::unreachable_unchecked::precondition_check 
          142:  call void @_RNvNvNtCsfozMkAdPo5N_4core4hint21unreachable_unchecked18precondition_checkCseeVnCcRg8kZ_10c_variadic(ptr align 4 @alloc_a354fc5ca77020c3c399cd70d9219f28) #14 
          143:  unreachable 
          144: } 
          145:  
          146: ; <core::ffi::va_list::VaList as core::ops::drop::Drop>::drop 
          147: ; Function Attrs: uwtable 
          148: define internal void @_RNvXsa_NtNtCsfozMkAdPo5N_4core3ffi7va_listNtB5_6VaListNtNtNtB9_3ops4drop4Drop4dropCseeVnCcRg8kZ_10c_variadic(ptr align 4 %self) unnamed_addr #1 { 
          149: start: 
          150:  ret void 
          151: } 
          152:  
          153: ; c_variadic::use_foreign_c_variadic_0 
          154: ; Function Attrs: nounwind uwtable 
          155: define void @_RNvCseeVnCcRg8kZ_10c_variadic24use_foreign_c_variadic_0() unnamed_addr #5 { 
          156: start: 
          157:  call void (i32, ...) @foreign_c_variadic_0(i32 0) #15 
          158:  call void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42) #15 
          159:  call void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024) #15 
          160:  call void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024, i32 0) #15 
check:30'0                                                                                X~~~~ error: no match found
          161:  ret void 
check:30'0     ~~~~~~~~~~
          162: } 
check:30'0     ~~
          163:  
check:30'0     ~
          164: ; c_variadic::use_foreign_c_variadic_1_0 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          165: ; Function Attrs: nounwind uwtable 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          166: define void @_RNvCseeVnCcRg8kZ_10c_variadic26use_foreign_c_variadic_1_0(ptr %ap) unnamed_addr #5 { 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          167: start: 
check:30'0     ~~~~~~~
          168:  call void (ptr, ...) @foreign_c_variadic_1(ptr %ap) #15 
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:30'1      ?                                                        possible intended match
          169:  ret void 
check:30'0     ~~~~~~~~~~
          170: } 
check:30'0     ~~
          171:  

@rust-bors
Copy link

rust-bors bot commented Dec 4, 2025

💔 Test for f1326ce failed: CI. Failed jobs:

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

Labels

A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.