about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-07-14 17:38:45 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-08-19 14:58:20 +0000
commit023b367037252e4aa1ceb3d394fa37e667fd3185 (patch)
tree843147e9850e30dff480029c3c7f7e30cb183526 /compiler/rustc_interface/src
parent3e50a641da8e97d79dad71202671f35918d6473c (diff)
downloadrust-023b367037252e4aa1ceb3d394fa37e667fd3185.tar.gz
rust-023b367037252e4aa1ceb3d394fa37e667fd3185.zip
Do not compute unneeded results.
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/passes.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index 18a669175b9..c800fe64b65 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -743,12 +743,11 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
     rustc_passes::hir_id_validator::check_crate(tcx);
 
     let sess = tcx.sess;
-    let mut entry_point = None;
 
     sess.time("misc_checking_1", || {
         parallel!(
             {
-                entry_point = sess.time("looking_for_entry_point", || tcx.entry_fn(()));
+                sess.time("looking_for_entry_point", || tcx.ensure().entry_fn(()));
 
                 sess.time("looking_for_derive_registrar", || {
                     tcx.ensure().proc_macro_decls_static(())
@@ -862,7 +861,7 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
 
         // This check has to be run after all lints are done processing. We don't
         // define a lint filter, as all lint checks should have finished at this point.
-        sess.time("check_lint_expectations", || tcx.check_expectations(None));
+        sess.time("check_lint_expectations", || tcx.ensure().check_expectations(None));
     });
 
     if sess.opts.unstable_opts.print_vtable_sizes {