Implement RFC 1260 with feature_name imported_main.

This commit is contained in:
Charles Lew
2021-04-26 01:09:35 +08:00
parent 727d101561
commit d261df4a72
38 changed files with 463 additions and 193 deletions

View File

@@ -13,7 +13,7 @@ pub(crate) fn maybe_create_entry_wrapper(
) {
let (main_def_id, use_start_lang_item) = match tcx.entry_fn(LOCAL_CRATE) {
Some((def_id, entry_ty)) => (
def_id.to_def_id(),
def_id,
match entry_ty {
EntryFnType::Main => true,
EntryFnType::Start => false,