Skip to main content

const_fold

Function const_fold 

Source
pub fn const_fold(
    pool: &ExprPool,
    builtins: &BuiltinSymbols,
    id: ExprId,
) -> ExprId
Expand description

Constant folding (spec §10.2 item 1): runs the simplify engine over the DAG and returns the canonical folded expression. Level-2 rules (0x, 1x, constant arithmetic, math constants) already live in crate::simplify::simplify.