Skip to main content

comparison_operand_of

Function comparison_operand_of 

Source
fn comparison_operand_of<'hir>(
    hir: &'hir Hir<'hir>,
    expr: &'hir Expr<'hir>,
) -> Option<(VariableId, Vec<ElementaryType>, IntegerRange)>
Expand description

Extracts a stable variable identity and the reachable integer range of an operand.

Explicit casts can change the range used for the comparison, but not necessarily the underlying value being compared. Keeping the cast path as part of the identity lets boundary compositions recognize identical nested casts without treating different conversions as identical.