diff options
| author | Mark Rowe <mrowe@bdash.net.nz> | 2025-05-27 11:37:52 -0700 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-05-30 19:17:10 -0400 |
| commit | a1b94836aaada389a88062541b1ca431fd9fc9ee (patch) | |
| tree | bf220ddde2df5b760ec9797476805608b838411c /rust/src/low_level_il/expression.rs | |
| parent | 9b35dee6ecabc8e92294c2072f66676fff8b1046 (diff) | |
[Rust] Make LowLevelIL{Expression,Instruction} implement Copy
Diffstat (limited to 'rust/src/low_level_il/expression.rs')
| -rw-r--r-- | rust/src/low_level_il/expression.rs | 16 |
1 files changed, 16 insertions, 0 deletions
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<R>, } +impl<M, F, R> 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, |
