fork/rust
git clone https://git.julia.blue/fork/rust
5e1a799842b
1.41.0
1error[E0601]: `main` function not found in crate `main_wrong_location` 2 --> $DIR/main-wrong-location.rs:1:1 3 | 4LL | / mod m { 5LL | | 6LL | | // An inferred main entry point (that doesn't use #[main]) 7LL | | // must appear at the top of the crate 8LL | | fn main() { } 9LL | | } 10 | |_^ the main function must be defined at the crate level (in `$DIR/main-wrong-location.rs`) 11 | 12note: here is a function named `main` 13 --> $DIR/main-wrong-location.rs:5:5 14 | 15LL | fn main() { } 16 | ^^^^^^^^^^^^^ 17 = note: you have one or more functions named `main` not defined at the crate level 18 = help: either move the `main` function definitions or attach the `#[main]` attribute to one of them 19 20error: aborting due to previous error 21 22For more information about this error, try `rustc --explain E0601`.