rust/src/test/ui/main-wrong-location.rs
Esteban Kuber 91f3603299 Do not point at whole file missing fn main
Only point at the end of the crate. We could try making it point at the
beginning of the crate, but that is confused with `DUMMY_SP`, causing
the output to be *worse*.

This change will make it so that VSCode will *not* underline the whole
file when `main` is missing, so other errors will be visible.
2022-03-05 02:42:55 +00:00

6 lines
143 B
Rust

mod m {
// An inferred main entry point
// must appear at the top of the crate
fn main() { }
} //~ ERROR `main` function not found