compiler/rustc_error_codes/src/error_codes/E0137.md MARKDOWN 27 lines View on github.com → Search inside
1#### Note: this error code is no longer emitted by the compiler.23More than one function was declared with the `#[main]` attribute.45Erroneous code example:67```compile_fail8#![feature(main)]910#[main]11fn foo() {}1213#[main]14fn f() {} // error: multiple functions with a `#[main]` attribute15```1617This error indicates that the compiler found multiple functions with the18`#[main]` attribute. This is an error because there must be a unique entry19point into a Rust program. Example:2021```compile_fail22#![feature(main)]2324#[main]25fn f() {} // ok!26```

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.