diff options
| author | bors <bors@rust-lang.org> | 2025-04-03 00:13:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-03 00:13:54 +0000 |
| commit | 365806089020f60a50391133a1430c40bc86963c (patch) | |
| tree | 5edb7b98d6964bdb0ebf0a00f5a7c2025e362a59 /compiler/rustc_mir_transform/src/lib.rs | |
| parent | d5b4c2e4f19b6d7037371cdaecc3cc2c701c68df (diff) | |
| parent | 3524e6ab0fd14627bd84b51e00f85e0a8f05f1b9 (diff) | |
| download | rust-365806089020f60a50391133a1430c40bc86963c.tar.gz rust-365806089020f60a50391133a1430c40bc86963c.zip | |
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.
Diffstat (limited to 'compiler/rustc_mir_transform/src/lib.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/lib.rs b/compiler/rustc_mir_transform/src/lib.rs index c372b77ad25..6429d3f67ec 100644 --- a/compiler/rustc_mir_transform/src/lib.rs +++ b/compiler/rustc_mir_transform/src/lib.rs @@ -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); } } |
