Skip to main content

rvalue_runtime_checks_value

Function rvalue_runtime_checks_value 

Source
pub(crate) fn rvalue_runtime_checks_value(rvalue: &Rvalue<'_>) -> Option<u64>
Expand description

Resolve a cfg!-style runtime-check flag (UbChecks, ContractChecks, OverflowChecks) to a constant u64. We fold to the no-check edge (0): the check only panics on a violated precondition, and its branchy body would otherwise corrupt field/Typed propagation during inlining. Older rustc lowers these to Rvalue::NullaryOp(NullOp::RuntimeChecks); newer rustc lowers them to Operand::RuntimeChecks.