Skip to content

Commit 56b5d11

Browse files
authored
Rollup merge of rust-lang#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.
2 parents 984cc68 + 64fcb00 commit 56b5d11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/ctfe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ impl<'tcx> LateLintPass<'tcx> for ClippyCtfe {
2121
_: Span,
2222
defid: LocalDefId,
2323
) {
24-
cx.tcx.ensure().mir_drops_elaborated_and_const_checked(defid); // Lint
24+
cx.tcx.ensure_ok().mir_drops_elaborated_and_const_checked(defid); // Lint
2525
}
2626
}

0 commit comments

Comments
 (0)