about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-02 12:31:55 +0100
committerGitHub <noreply@github.com>2025-02-02 12:31:55 +0100
commit84595c2b1ea8f349f5a8da2084021855262b51f8 (patch)
treefa883d2a979dbb4241dc38752826775ce0511356
parentbbb87335154cad31bde1fafc6d67b1c5509b6448 (diff)
parent89abc1921586807214842ba37b85d7eed5361088 (diff)
Rollup merge of #136279 - Zalathar:ensure-ok, r=oli-obk
Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs

This is all based on my archaeology for https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60TyCtxtEnsure.60.

The main renamings are:
- `tcx.ensure()` → `tcx.ensure_ok()`
- `tcx.ensure_with_value()` → `tcx.ensure_done()`
- Query modifier `ensure_forwards_result_if_red` → `return_result_from_ensure_ok`

Hopefully these new names are a better fit for the *actual* function and purpose of these query call modes.
-rw-r--r--src/driver/aot.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/driver/aot.rs b/src/driver/aot.rs
index 27adf6318e2..a52b18573b1 100644
--- a/src/driver/aot.rs
+++ b/src/driver/aot.rs
@@ -692,7 +692,7 @@ pub(crate) fn run_aot(
 
     if tcx.dep_graph.is_fully_enabled() {
         for cgu in cgus {
-            tcx.ensure().codegen_unit(cgu.name());
+            tcx.ensure_ok().codegen_unit(cgu.name());
         }
     }