rust/compiler/rustc_passes
bors f8ac8fdacf Auto merge of #86190 - asquared31415:extern-main-86110-fix, r=varkor
Fix ICE when `main` is declared in an `extern` block

Changes in #84401 to implement `imported_main` changed how the crate entry point is found, and a declared `main` in an `extern` block was detected erroneously.  This was causing the ICE described in #86110.

This PR adds a check for this case and emits an error instead.  Previously a `main` declaration in an `extern` block was not detected as an entry point at all, so emitting an error shouldn't break anything that worked previously.  In 1.52.1 stable this is demonstrated, with a `` `main` function not found`` error.

Fixes #86110
2021-07-01 06:39:37 +00:00
..
src Auto merge of #86190 - asquared31415:extern-main-86110-fix, r=varkor 2021-07-01 06:39:37 +00:00
Cargo.toml rustc_passes: Remove unused dependency rustc_trait_selection 2021-06-25 01:12:59 -07:00