2018-03-13 11:22:43 -07:00
|
|
|
error[E0601]: `main` function not found in crate `main_wrong_location`
|
2019-09-08 13:06:49 -04:00
|
|
|
--> $DIR/main-wrong-location.rs:1:1
|
2018-02-23 03:42:32 +03:00
|
|
|
|
|
2019-09-08 13:06:49 -04:00
|
|
|
LL | / mod m {
|
|
|
|
LL | |
|
2021-04-08 21:37:38 +08:00
|
|
|
LL | | // An inferred main entry point
|
2019-09-08 13:06:49 -04:00
|
|
|
LL | | // must appear at the top of the crate
|
|
|
|
LL | | fn main() { }
|
|
|
|
LL | | }
|
|
|
|
| |_^ the main function must be defined at the crate level (in `$DIR/main-wrong-location.rs`)
|
|
|
|
|
|
|
|
|
note: here is a function named `main`
|
|
|
|
--> $DIR/main-wrong-location.rs:5:5
|
2018-02-23 03:42:32 +03:00
|
|
|
|
|
|
|
|
LL | fn main() { }
|
|
|
|
| ^^^^^^^^^^^^^
|
2019-09-08 13:06:49 -04:00
|
|
|
= note: you have one or more functions named `main` not defined at the crate level
|
2021-04-08 21:37:38 +08:00
|
|
|
= help: consider moving the `main` function definitions
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0601`.
|