Skip to main content

stack_idx_to_i32

Function stack_idx_to_i32 

Source
pub fn stack_idx_to_i32(i: StackIdx) -> i32
Expand description

Phase-A code casts StackIdx as i32; provide a From so it compiles. TODO(phase-b): expressions like state.top_idx().0 as i32 should become state.top_idx().raw() as i32. The non-primitive-cast error is silenced here by promoting the StackIdx through a free-function conversion.