Unfortunately, the diagnotic machinery does not cope well with an empty span which can happen if the crate is empty, in which case we merely set a spanless note.
6 lines
171 B
Rust
6 lines
171 B
Rust
mod m {
|
|
//~^ ERROR `main` function not found
|
|
// An inferred main entry point (that doesn't use #[main])
|
|
// must appear at the top of the crate
|
|
fn main() { }
|
|
}
|