Skip to content

Commit 82c2eb4

Browse files
committed
Auto merge of rust-lang#114908 - cjgillot:no-let-under, r=compiler-errors
Do not compute unneeded query results. r? `@ghost`
2 parents d64c845 + 023b367 commit 82c2eb4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

compiler/rustc_hir_analysis/src/check/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ fn check_impl_items_against_trait<'tcx>(
823823
};
824824
match ty_impl_item.kind {
825825
ty::AssocKind::Const => {
826-
let _ = tcx.compare_impl_const((
826+
tcx.ensure().compare_impl_const((
827827
impl_item.expect_local(),
828828
ty_impl_item.trait_item_def_id.unwrap(),
829829
));

compiler/rustc_interface/src/passes.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -743,12 +743,11 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
743743
rustc_passes::hir_id_validator::check_crate(tcx);
744744

745745
let sess = tcx.sess;
746-
let mut entry_point = None;
747746

748747
sess.time("misc_checking_1", || {
749748
parallel!(
750749
{
751-
entry_point = sess.time("looking_for_entry_point", || tcx.entry_fn(()));
750+
sess.time("looking_for_entry_point", || tcx.ensure().entry_fn(()));
752751

753752
sess.time("looking_for_derive_registrar", || {
754753
tcx.ensure().proc_macro_decls_static(())
@@ -863,7 +862,7 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
863862

864863
// This check has to be run after all lints are done processing. We don't
865864
// define a lint filter, as all lint checks should have finished at this point.
866-
sess.time("check_lint_expectations", || tcx.check_expectations(None));
865+
sess.time("check_lint_expectations", || tcx.ensure().check_expectations(None));
867866
});
868867

869868
if sess.opts.unstable_opts.print_vtable_sizes {

0 commit comments

Comments
 (0)