rust/src/librustc_error_codes/error_codes/E0136.md
2020-01-04 00:32:29 +01:00

338 B

More than one main function was found.

Erroneous code example:

fn main() {
    // ...
}

// ...

fn main() { // error!
    // ...
}

A binary can only have one entry point, and by default that entry point is the main() function. If there are multiple instances of this function, please rename one of them.