fn validate_expr_in_temporary(
        &mut self,
        expr: syntax::Expr,
    ) -> (validated::Expr, validated::Place) {
        let local_variable = self.add(
            validated::LocalVariableData {
                name: None,
                atomic: Atomic::No,
            },
            validated::LocalVariableOrigin::Temporary(expr),
        );
        self.scope.insert_temporary(local_variable);

        let validated_place = self.add(
            validated::PlaceData::LocalVariable(local_variable),
            expr.synthesized(),
        );
        let validated_expr = self.validate_expr(expr);

        let assign_expr = self.add(
            validated::ExprData::Assign(validated_place, validated_expr),
            expr.synthesized(),
        );

        (assign_expr, validated_place)
    }
/// Given an expression E, create a new temporary variable V and return a `V = E` expression.
Given an expression E, create a new temporary variable V and return a `V = E` expression.
Given an expression E create a new temporary variable V and return a ` V = E ` expression .
fn validate_expr_in_temporary(
        &mut self,
        expr: syntax::Expr,
    ) -> (validated::Expr, validated::Place) {
        let local_variable = self.add(
            validated::LocalVariableData {
                name: None,
                atomic: Atomic::No,
            },
            validated::LocalVariableOrigin::Temporary(expr),
        );
        self.scope.insert_temporary(local_variable);
        let validated_place = self.add(
            validated::PlaceData::LocalVariable(local_variable),
            expr.synthesized(),
        );
        let validated_expr = self.validate_expr(expr);
        let assign_expr = self.add(
            validated::ExprData::Assign(validated_place, validated_expr),
            expr.synthesized(),
        );
        (assign_expr, validated_place)
    }
fn validate_expr_in_temporary ( & mut self , expr : syntax :: Expr , ) -> ( validated :: Expr , validated :: Place ) { let local_variable = self . add ( validated :: LocalVariableData { name : None , atomic : Atomic :: No , } , validated :: LocalVariableOrigin :: Temporary ( expr ) , ) ; self . scope . insert_temporary ( local_variable ) ; let validated_place = self . add ( validated :: PlaceData :: LocalVariable ( local_variable ) , expr . synthesized ( ) , ) ; let validated_expr = self . validate_expr ( expr ) ; let assign_expr = self . add ( validated :: ExprData :: Assign ( validated_place , validated_expr ) , expr . synthesized ( ) , ) ; ( assign_expr , validated_place ) }
Given an expression E, create a new temporary variable V and return a `V = E` expression.
Given an expression E create a new temporary variable V and return a ` V = E ` expression .
&mut self
expr
syntax::Expr
&mut self
expr
syntax::Expr