1
Fork 0

Auto merge of #139234 - compiler-errors:query-tweak, r=oli-obk

Misc query tweaks

Remove some redundant work around `cache_on_disk` and `ensure_ok`, since `Result<(), ErrorGuaranteed>` queries don't need to cache or recompute their "value" if they are only used for their result.
This commit is contained in:
bors 2025-04-03 00:13:54 +00:00
commit 3658060890
5 changed files with 8 additions and 11 deletions

View file

@ -529,7 +529,7 @@ fn mir_drops_elaborated_and_const_checked(tcx: TyCtxt<'_>, def: LocalDefId) -> &
| DefKind::Static { .. }
| DefKind::Const
| DefKind::AssocConst => {
if let Err(guar) = tcx.check_well_formed(root.expect_local()) {
if let Err(guar) = tcx.ensure_ok().check_well_formed(root.expect_local()) {
body.tainted_by_errors = Some(guar);
}
}