From a1b94836aaada389a88062541b1ca431fd9fc9ee Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Tue, 27 May 2025 11:37:52 -0700 Subject: [Rust] Make LowLevelIL{Expression,Instruction} implement Copy --- rust/src/low_level_il/expression.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'rust/src/low_level_il/expression.rs') diff --git a/rust/src/low_level_il/expression.rs b/rust/src/low_level_il/expression.rs index 8df8dfe0..81c4e57d 100644 --- a/rust/src/low_level_il/expression.rs +++ b/rust/src/low_level_il/expression.rs @@ -59,6 +59,7 @@ where T: FnMut(&LowLevelILExpression<'func, M, F, ValueExpr>) -> VisitorAction; } +#[derive(Copy)] pub struct LowLevelILExpression<'func, M, F, R> where M: FunctionMutability, @@ -72,6 +73,21 @@ where pub(crate) _ty: PhantomData, } +impl Clone for LowLevelILExpression<'_, M, F, R> +where + M: FunctionMutability, + F: FunctionForm, + R: ExpressionResultType, +{ + fn clone(&self) -> Self { + Self { + function: self.function, + index: self.index, + _ty: PhantomData, + } + } +} + impl<'func, M, F, R> LowLevelILExpression<'func, M, F, R> where M: FunctionMutability, -- cgit v1.3.1