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_const_eval/src | |
| 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_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/check_consts/check.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs index 90002d3f109..2b74c849f1a 100644 --- a/compiler/rustc_const_eval/src/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/check_consts/check.rs @@ -335,7 +335,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> { self.tcx.dcx().span_bug(span, "tls access is checked in `Rvalue::ThreadLocalRef`"); } if let Some(def_id) = def_id.as_local() - && let Err(guar) = self.tcx.at(span).check_well_formed(hir::OwnerId { def_id }) + && let Err(guar) = self.tcx.ensure_ok().check_well_formed(hir::OwnerId { def_id }) { self.error_emitted = Some(guar); } |
