- let (main_def_id, use_start_lang_item) = match *tcx.sess.entry_fn.borrow() {
- Some((id, _, entry_ty)) => (
- tcx.hir().local_def_id(id),
+ let (main_def_id, use_start_lang_item) = match tcx.entry_fn(LOCAL_CRATE) {
+ Some((def_id, entry_ty)) => (
+ def_id,