diff --git a/src/proc/constant_evaluator.rs b/src/proc/constant_evaluator.rs index 88c03bf57f..6b917c4d67 100644 --- a/src/proc/constant_evaluator.rs +++ b/src/proc/constant_evaluator.rs @@ -796,11 +796,11 @@ impl ConstantEvaluator<'_> { /// constant's value into the function's arena so we can operate on it. fn copy_from( &mut self, - handle: Handle, + expr: Handle, expressions: &Arena, ) -> Result, ConstantEvaluatorError> { - let span = expressions.get_span(handle); - match expressions[handle] { + let span = expressions.get_span(expr); + match expressions[expr] { ref expr @ (Expression::Literal(_) | Expression::Constant(_) | Expression::ZeroValue(_)) => Ok(self.register_evaluated_expr(expr.clone(), span)),