Content-Length: 12828 | pFad | https://doc.rust-lang.org/reference/../std/../std/vec/../sync/../rc/../../error_codes/./E0045.html

E0045 - Error codes index

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error code E0045

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, ...);
}
}








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/reference/../std/../std/vec/../sync/../rc/../../error_codes/./E0045.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy