pub const fn contract_check_requires<C>(cond: C)where
C: Fn() -> bool + Copy,
contracts_internals #128044)
Check if the pre-condition cond has been met.
By default, if contract_checks is enabled, this will panic with no unwind if the condition returns false.
Note that this function is a no-op during constant evaluation.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/intrinsics/fn.contract_check_requires.html