Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
58e901b6fd1163172149fd422565523b17eed5f0
rust/tests/ui/main-wrong-location.rs

6 lines
143 B
Rust
Raw Normal View History

rustc: Only accept main functions at the crate level. #4433
2013-04-29 16:16:58 -07:00
mod m {
Remove #[main] attribute.
2021-04-08 21:37:38 +08:00
// An inferred main entry point
rustc: Only accept main functions at the crate level. #4433
2013-04-29 16:16:58 -07:00
// must appear at the top of the crate
Remove NOTE/HELP annotations from UI tests
2017-12-10 23:29:24 +03:00
fn main() { }
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-01-21 00:15:39 +00:00
} //~ ERROR `main` function not found
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3692ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API