diff --git a/src/ast2/mod.rs b/src/ast2/mod.rs index 0196535..b915613 100644 --- a/src/ast2/mod.rs +++ b/src/ast2/mod.rs @@ -1030,15 +1030,10 @@ impl Ast { } /// converts from a value expression to a place expression. - fn push_value_to_place_conversion(&mut self, rvalue: Index) -> Index { + fn push_value_to_place_conversion(&mut self, index: Index) -> Index { let loc = self.get_loc(index); let i = self.reserve_node_other(); - self.set_tag_data_source_loc( - rvalue, - Tag::ValueToPlaceConversion, - Data::index(rvalue), - loc, - ); + self.set_tag_data_source_loc(index, Tag::ValueToPlaceConversion, Data::index(index), loc); i } @@ -4803,7 +4798,8 @@ pub trait AstVisitorTrait { Tag::ValueToPlaceConversion => self.visit_value_to_place_conversion(ast, idx), Tag::Error => todo!(), Tag::Undefined => todo!(), - _ => todo!(), + Tag::Root => todo!(), + Tag::File => todo!(), } } }