Struct cairo_lang_lowering::inline::Mapper
source · pub struct Mapper<'a, 'b> { /* private fields */ }
Expand description
Context for mapping ids from lowered
to a new FlatLowered
object.
Implementations§
source§impl<'a, 'b> Mapper<'a, 'b>
impl<'a, 'b> Mapper<'a, 'b>
sourcepub fn rename_var(&mut self, old_var_id: &VariableId) -> VariableId
pub fn rename_var(&mut self, old_var_id: &VariableId) -> VariableId
Renames a var from lowered.variable, if the variable wasn’t assigned an id yet, a new id is assigned and stored for future renames.
sourcepub fn update_remapping(&mut self, remapping: &VarRemapping) -> VarRemapping
pub fn update_remapping(&mut self, remapping: &VarRemapping) -> VarRemapping
Apply rename_var to all the variable in the remapping
.