Skip to main content

E0029: Not a Function

You tried to call something that is not a function.

Example

fn main() {
let x = 42;
x(); // Error: cannot call value of type `i64` as a function
}

How to fix

Make sure you're calling an actual function:

fn get_value() -> i64 {
42
}

fn main() {
let x = get_value(); // OK - calling a function
}

Check for typos in the function name, or ensure the identifier refers to a function rather than a variable.