More than one function was declared with the #[main] attribute.
Erroneous code example:
#![allow(unused)]
#![feature(main)]
fn main() {
#[main]
fn foo() {}
#[main]
fn f() {} // error: multiple functions with a `#[main]` attribute
} This error indicates that the compiler found multiple functions with the #[main] attribute. This is an error because there must be a unique entry point into a Rust program. Example:
#![allow(unused)]
#![feature(main)]
fn main() {
#[main]
fn f() {} // ok!
}
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0137.html