Implement RFC 1260 with feature_name imported_main
.
This commit is contained in:
parent
ea3398ad98
commit
fa559fb2df
@ -103,7 +103,7 @@ pub(super) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! {
|
||||
});
|
||||
|
||||
let (main_def_id, entry_ty) = tcx.entry_fn(LOCAL_CRATE).unwrap();
|
||||
let instance = Instance::mono(tcx, main_def_id.to_def_id()).polymorphize(tcx);
|
||||
let instance = Instance::mono(tcx, main_def_id).polymorphize(tcx);
|
||||
|
||||
match entry_ty {
|
||||
EntryFnType::Main => {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user