Use () for entry_fn.

This commit is contained in:
Camille GILLOT 2021-05-11 12:00:59 +02:00
parent 601453a2ac
commit 829a9d33a9
13 changed files with 19 additions and 27 deletions

View file

@ -820,8 +820,7 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
sess.time("misc_checking_1", || {
parallel!(
{
entry_point = sess
.time("looking_for_entry_point", || rustc_passes::entry::find_entry_point(tcx));
entry_point = sess.time("looking_for_entry_point", || tcx.entry_fn(()));
sess.time("looking_for_plugin_registrar", || {
plugin::build::find_plugin_registrar(tcx)

View file

@ -302,7 +302,7 @@ impl<'tcx> Queries<'tcx> {
/// to write UI tests that actually test that compilation succeeds without reporting
/// an error.
fn check_for_rustc_errors_attr(tcx: TyCtxt<'_>) {
let def_id = match tcx.entry_fn(LOCAL_CRATE) {
let def_id = match tcx.entry_fn(()) {
Some((def_id, _)) => def_id,
_ => return,
};