Content-Length: 12938 | pFad | https://doc.rust-lang.org/std/pin/../default/../rc/../../../std/../error_codes/./E0061.html

E0061 - 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 E0061

An invalid number of arguments was passed when calling a function.

Erroneous code example:

#![allow(unused)]
fn main() {
fn f(u: i32) {}

f(); // error!
}

The number of arguments passed to a function must match the number of arguments specified in the function signature.

For example, a function like:

#![allow(unused)]
fn main() {
fn f(a: u16, b: &str) {}
}

Must always be called with exactly two arguments, e.g., f(2, "test").

Note that Rust does not have a notion of optional function arguments or variadic functions (except for its C-FFI).









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/std/pin/../default/../rc/../../../std/../error_codes/./E0061.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy