Change:
<!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at /rust/deps/itertools- 'itertools: .zipeq() reached end of one iterator before the other'', 'thread 'rustc' panicked at /rust/deps/itertools- 'itertools: .zipeq() reached end of one iterator before the other'' File: --auto-reduced (treereduce-rust): &lt;details&lt;summary&lt;strongoriginal code&lt;/strong&lt;/summary&lt;poriginal: </p</detailsVersion information ` Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details<!-- query stack: [typeck] type-checking [analysis] running analysis passes on this crate -- label +F-cvariadic +F-fndelegation <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
cc
lol
Thanks! I will take a look. (I'm glad we the check!)
another one that does not need delegation I think
claim

Discussion:
is_method: bool, ) -> Option<Vec<(Option<&hir::GenericParam<'_>>, &hir::Param<'_>)>> { let fn_node = self.tcx.hir().get_if_local(def_id)?; <ins> let fn_decl = fn_node.fn_decl()?; </ins> <del> let generic_params: Vec<Option<&hir::GenericParam<'_>>> = fn_node .fn_decl()? </del> <ins> let generic_params: Vec<Option<&hir::GenericParam<'_>>> = fn_decl </ins> .inputs .into_iter() .skip(if is_method { 1 } else { 0 })

}) .collect(); <del> let params: Vec<&hir::Param<'_>> = self </del> <ins> let mut params: Vec<&hir::Param<'_>> = self </ins> .tcx .hir() .body(fn_node.body_id()?)

.skip(if is_method { 1 } else { 0 }) .collect(); <del> Some(generic_params.into_iter().zip_eq(params).collect()) </del> <ins> // The surrounding code expects variadic functions to not have a parameter representing // the "..." parameter. This is already true of the FnDecl but not of the body params, so // we drop it if it exists. if fn_decl.c_variadic { params.pop(); } debug_assert_eq!(params.len(), generic_params.len()); Some(generic_params.into_iter().zip(params).collect()) </ins> } }

<del> //@ known-bug: rust-lang/rust#130372 pub fn variadic_fn(n: usize, mut args: ...) {} reuse variadic_fn; fn main() { variadic_fn(); } </del>

<del> //@ known-bug: rust-lang/rust#130372 pub fn test_va_copy(_: u64, mut ap: ...) {} pub fn main() { unsafe { test_va_copy(); call(x); } } </del>

<del> //@ known-bug: rust-lang/rust#130372 fn bar() -> impl Fn() { wrap() } fn wrap(...: impl ...) -> impl Fn() {} </del>

<ins> #![feature(c_variadic)] // Regression test that covers all 3 cases of https://github.com/rust-lang/rust/issues/130372 unsafe extern "C" fn test_va_copy(_: u64, mut ap: ...) {} pub fn main() { unsafe { test_va_copy(); //~^ ERROR this function takes at least 1 argument but 0 arguments were supplied } } </ins>

<ins> error[E0060]: this function takes at least 1 argument but 0 arguments were supplied --> $DIR/mismatch-args-vargs-issue-130372.rs:9:9 | LL |         test_va_copy(); |         ^^^^^^^^^^^^-- argument #1 of type `u64` is missing | note: function defined here --> $DIR/mismatch-args-vargs-issue-130372.rs:5:22 | LL | unsafe extern "C" fn test_va_copy(_: u64, mut ap: ...) {} |                      ^^^^^^^^^^^^ ------ help: provide the argument | LL |         test_va_copy(/* u64 */); |                     ~~~~~~~~~~~ error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0060`. </ins>