Argument count mismatch at a call site.
fn greet(first: &str, last: &str) {
println!("Hi {} {}", first, last);
}
greet("Ada"); // E0061: takes 2 arguments but 1 was supplied
Rust does not insert defaults or tolerate missing arguments. The signature is the contract; the call must satisfy it exactly.
- Pass the missing arguments.
- If the missing args are typically empty, refactor to take an Option<T> or split the function (greet_first, greet_full).
- For ergonomic optional parameters, use a builder pattern.
- For variable-arity, take a slice or a tuple instead of multiple parameters.