1 error[E0060]: this function takes at least 2 parameters but 0 parameters were supplied
2 --> $DIR/variadic-ffi-3.rs:11:9
4 LL | fn foo(f: isize, x: u8, ...);
5 | ----------------------------- defined here
8 | ^^^^^ expected at least 2 parameters
10 error[E0060]: this function takes at least 2 parameters but 1 parameter was supplied
11 --> $DIR/variadic-ffi-3.rs:12:9
13 LL | fn foo(f: isize, x: u8, ...);
14 | ----------------------------- defined here
17 | ^^^^^^ expected at least 2 parameters
19 error[E0308]: mismatched types
20 --> $DIR/variadic-ffi-3.rs:14:56
22 LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo;
23 | ^^^ expected non-variadic fn, found variadic function
25 = note: expected type `unsafe extern "C" fn(isize, u8)`
26 found type `for<'r> unsafe extern "C" fn(isize, u8, std::ffi::VaList<'r>, ...) {foo}`
28 error[E0308]: mismatched types
29 --> $DIR/variadic-ffi-3.rs:18:54
31 LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar;
32 | ^^^ expected variadic fn, found non-variadic function
34 = note: expected type `for<'r> extern "C" fn(isize, u8, std::ffi::VaList<'r>, ...)`
35 found type `extern "C" fn(isize, u8) {bar}`
37 error[E0617]: can't pass `f32` to variadic function
38 --> $DIR/variadic-ffi-3.rs:22:19
41 | ^^^^ help: cast the value to `c_double`: `3f32 as c_double`
43 error[E0617]: can't pass `bool` to variadic function
44 --> $DIR/variadic-ffi-3.rs:23:19
47 | ^^^^ help: cast the value to `c_int`: `true as c_int`
49 error[E0617]: can't pass `i8` to variadic function
50 --> $DIR/variadic-ffi-3.rs:24:19
53 | ^^^ help: cast the value to `c_int`: `1i8 as c_int`
55 error[E0617]: can't pass `u8` to variadic function
56 --> $DIR/variadic-ffi-3.rs:25:19
59 | ^^^ help: cast the value to `c_uint`: `1u8 as c_uint`
61 error[E0617]: can't pass `i16` to variadic function
62 --> $DIR/variadic-ffi-3.rs:26:19
65 | ^^^^ help: cast the value to `c_int`: `1i16 as c_int`
67 error[E0617]: can't pass `u16` to variadic function
68 --> $DIR/variadic-ffi-3.rs:27:19
71 | ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint`
73 error: aborting due to 10 previous errors
75 Some errors have detailed explanations: E0060, E0308, E0617.
76 For more information about an error, try `rustc --explain E0060`.