rust/compiler/rustc_ast/src
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
..
ast mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
attr Implement token-based handling of attributes during expansion 2021-04-11 01:31:36 -04:00
expand Make allocator_kind a query. 2021-06-20 11:52:51 +02:00
util Remove unnecessary manual shrink_to_fit calls 2021-01-16 14:02:36 +01:00
ast_like.rs parser: Ensure that all nonterminals have tokens after parsing 2021-06-06 14:21:12 +03:00
ast.rs Auto merge of #86599 - Amanieu:asm_raw, r=nagisa 2021-06-25 20:44:28 +00:00
entry.rs Fix ICE when main is declared in an extern block 2021-06-09 23:14:02 -04:00
lib.rs Update to new bootstrap compiler 2021-06-28 11:30:49 -04:00
mut_visit.rs Use AttrVec for Arm, FieldDef, and Variant 2021-06-17 08:04:54 +09:00
node_id.rs Clarify docs for DUMMY_NODE_ID 2021-02-07 19:42:12 -08:00
ptr.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
token.rs remove pat2021 2021-04-27 21:15:59 -05:00
tokenstream.rs don't clone attrs 2021-05-30 22:44:40 +03:00
visit.rs Add support for using qualified paths with structs in expression and pattern 2021-06-10 13:18:41 +02:00