Variadic parameters have been used on a non-C ABI function.
Erroneous code example:
#![allow(unused)]
fn main() {
extern "Rust" {
fn foo(x: u8, ...); // error!
}
} Rust only supports variadic parameters for interoperability with C code in its FFI. As such, variadic parameters can only be used with functions which are using the C ABI. To fix such code, put them in an extern "C" block:
#![allow(unused)]
fn main() {
extern "C" {
fn foo (x: u8, ...);
}
}
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0045.html