pub fn build_check_ensures<Ret, C>(cond: C) -> impl Fn(Ret) + Copy
🔬This is a nightly-only experimental API. (
contracts_internals
)Expand description
Emitted by rustc as a desugaring of #[ensures(PRED)] fn foo() -> R { ... [return R;] ... }
into: fn foo() { let _check = build_check_ensures(|ret| PRED) ... [return _check(R);] ... }
(including the implicit return of the tail expression, if any).