]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0136.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0136.md
1 #### Note: this error code is no longer emitted by the compiler.
2
3 More than one `main` function was found.
4
5 Erroneous code example:
6
7 ```compile_fail
8 fn main() {
9     // ...
10 }
11
12 // ...
13
14 fn main() { // error!
15     // ...
16 }
17 ```
18
19 A binary can only have one entry point, and by default that entry point is the
20 `main()` function. If there are multiple instances of this function, please
21 rename one of them.