diff options
Diffstat (limited to 'rust/src/low_level_il')
| -rw-r--r-- | rust/src/low_level_il/function.rs | 14 | ||||
| -rw-r--r-- | rust/src/low_level_il/lifting.rs | 22 |
2 files changed, 18 insertions, 18 deletions
diff --git a/rust/src/low_level_il/function.rs b/rust/src/low_level_il/function.rs index ca6508c9..6d2e4239 100644 --- a/rust/src/low_level_il/function.rs +++ b/rust/src/low_level_il/function.rs @@ -95,7 +95,7 @@ where } } - pub fn instruction_at<L: Into<Location>>(&self, loc: L) -> Option<LowLevelILInstruction<M, F>> { + pub fn instruction_at<L: Into<Location>>(&self, loc: L) -> Option<LowLevelILInstruction<'_, M, F>> { Some(LowLevelILInstruction::new( self, self.instruction_index_at(loc)?, @@ -103,7 +103,7 @@ where } /// Get all the instructions for a given location. - pub fn instructions_at<L: Into<Location>>(&self, loc: L) -> Vec<LowLevelILInstruction<M, F>> { + pub fn instructions_at<L: Into<Location>>(&self, loc: L) -> Vec<LowLevelILInstruction<'_, M, F>> { let loc = loc.into(); self.instruction_indexes_at(loc) .iter() @@ -146,7 +146,7 @@ where pub fn instruction_from_index( &self, index: LowLevelInstructionIndex, - ) -> Option<LowLevelILInstruction<M, F>> { + ) -> Option<LowLevelILInstruction<'_, M, F>> { if index.0 >= self.instruction_count() { None } else { @@ -178,7 +178,7 @@ where } } - pub fn basic_blocks(&self) -> Array<BasicBlock<LowLevelILBlock<M, F>>> { + pub fn basic_blocks(&self) -> Array<BasicBlock<LowLevelILBlock<'_, M, F>>> { use binaryninjacore_sys::BNGetLowLevelILBasicBlockList; unsafe { @@ -195,7 +195,7 @@ where pub fn basic_block_containing_index( &self, index: LowLevelInstructionIndex, - ) -> Option<Ref<BasicBlock<LowLevelILBlock<M, F>>>> { + ) -> Option<Ref<BasicBlock<LowLevelILBlock<'_, M, F>>>> { let block = unsafe { BNGetLowLevelILBasicBlockForInstruction(self.handle, index.0) }; if block.is_null() { None @@ -259,7 +259,7 @@ impl<M: FunctionMutability> LowLevelILFunction<M, SSA> { pub fn get_ssa_register_uses<R: ArchReg>( &self, reg: LowLevelILSSARegisterKind<R>, - ) -> Vec<LowLevelILInstruction<M, SSA>> { + ) -> Vec<LowLevelILInstruction<'_, M, SSA>> { use binaryninjacore_sys::BNGetLowLevelILSSARegisterUses; let register_id = match reg { LowLevelILSSARegisterKind::Full { kind, .. } => kind.id(), @@ -287,7 +287,7 @@ impl<M: FunctionMutability> LowLevelILFunction<M, SSA> { pub fn get_ssa_register_definition<R: ArchReg>( &self, reg: &LowLevelILSSARegisterKind<R>, - ) -> Option<LowLevelILInstruction<M, SSA>> { + ) -> Option<LowLevelILInstruction<'_, M, SSA>> { use binaryninjacore_sys::BNGetLowLevelILSSARegisterDefinition; let register_id = match reg { LowLevelILSSARegisterKind::Full { kind, .. } => kind.id(), diff --git a/rust/src/low_level_il/lifting.rs b/rust/src/low_level_il/lifting.rs index acb21301..09117150 100644 --- a/rust/src/low_level_il/lifting.rs +++ b/rust/src/low_level_il/lifting.rs @@ -803,7 +803,7 @@ impl<'a> LiftableLowLevelILWithSize<'a> for ExpressionBuilder<'a, ValueExpr> { macro_rules! no_arg_lifter { ($name:ident, $op:ident, $result:ty) => { - pub fn $name(&self) -> LowLevelILExpression<Mutable, NonSSA, $result> { + pub fn $name(&self) -> LowLevelILExpression<'_, Mutable, NonSSA, $result> { use binaryninjacore_sys::BNLowLevelILAddExpr; use binaryninjacore_sys::BNLowLevelILOperation::$op; @@ -816,7 +816,7 @@ macro_rules! no_arg_lifter { macro_rules! sized_no_arg_lifter { ($name:ident, $op:ident, $result:ty) => { - pub fn $name(&self, size: usize) -> ExpressionBuilder<$result> { + pub fn $name(&self, size: usize) -> ExpressionBuilder<'_, $result> { use binaryninjacore_sys::BNLowLevelILOperation::$op; ExpressionBuilder { @@ -1006,7 +1006,7 @@ impl LowLevelILMutableFunction { true } - pub fn const_int(&self, size: usize, val: u64) -> LowLevelILMutableExpression<ValueExpr> { + pub fn const_int(&self, size: usize, val: u64) -> LowLevelILMutableExpression<'_, ValueExpr> { use binaryninjacore_sys::BNLowLevelILAddExpr; use binaryninjacore_sys::BNLowLevelILOperation::LLIL_CONST; @@ -1016,7 +1016,7 @@ impl LowLevelILMutableFunction { LowLevelILExpression::new(self, LowLevelExpressionIndex(expr_idx)) } - pub fn const_ptr_sized(&self, size: usize, val: u64) -> LowLevelILMutableExpression<ValueExpr> { + pub fn const_ptr_sized(&self, size: usize, val: u64) -> LowLevelILMutableExpression<'_, ValueExpr> { use binaryninjacore_sys::BNLowLevelILAddExpr; use binaryninjacore_sys::BNLowLevelILOperation::LLIL_CONST_PTR; @@ -1026,11 +1026,11 @@ impl LowLevelILMutableFunction { LowLevelILExpression::new(self, LowLevelExpressionIndex(expr_idx)) } - pub fn const_ptr(&self, val: u64) -> LowLevelILMutableExpression<ValueExpr> { + pub fn const_ptr(&self, val: u64) -> LowLevelILMutableExpression<'_, ValueExpr> { self.const_ptr_sized(self.arch().address_size(), val) } - pub fn trap(&self, val: u64) -> LowLevelILExpression<Mutable, NonSSA, VoidExpr> { + pub fn trap(&self, val: u64) -> LowLevelILExpression<'_, Mutable, NonSSA, VoidExpr> { use binaryninjacore_sys::BNLowLevelILAddExpr; use binaryninjacore_sys::BNLowLevelILOperation::LLIL_TRAP; @@ -1119,7 +1119,7 @@ impl LowLevelILMutableFunction { &self, size: usize, reg: LR, - ) -> LowLevelILMutableExpression<ValueExpr> { + ) -> LowLevelILMutableExpression<'_, ValueExpr> { use binaryninjacore_sys::BNLowLevelILAddExpr; use binaryninjacore_sys::BNLowLevelILOperation::LLIL_REG; @@ -1137,7 +1137,7 @@ impl LowLevelILMutableFunction { size: usize, hi_reg: LR, lo_reg: LR, - ) -> LowLevelILMutableExpression<ValueExpr> { + ) -> LowLevelILMutableExpression<'_, ValueExpr> { use binaryninjacore_sys::BNLowLevelILAddExpr; use binaryninjacore_sys::BNLowLevelILOperation::LLIL_REG_SPLIT; @@ -1226,7 +1226,7 @@ impl LowLevelILMutableFunction { } } - pub fn flag(&self, flag: impl Flag) -> LowLevelILMutableExpression<ValueExpr> { + pub fn flag(&self, flag: impl Flag) -> LowLevelILMutableExpression<'_, ValueExpr> { use binaryninjacore_sys::BNLowLevelILAddExpr; use binaryninjacore_sys::BNLowLevelILOperation::LLIL_FLAG; @@ -1238,7 +1238,7 @@ impl LowLevelILMutableFunction { LowLevelILExpression::new(self, LowLevelExpressionIndex(expr_idx)) } - pub fn flag_cond(&self, cond: FlagCondition) -> LowLevelILMutableExpression<ValueExpr> { + pub fn flag_cond(&self, cond: FlagCondition) -> LowLevelILMutableExpression<'_, ValueExpr> { use binaryninjacore_sys::BNLowLevelILAddExpr; use binaryninjacore_sys::BNLowLevelILOperation::LLIL_FLAG_COND; @@ -1249,7 +1249,7 @@ impl LowLevelILMutableFunction { LowLevelILExpression::new(self, LowLevelExpressionIndex(expr_idx)) } - pub fn flag_group(&self, group: impl FlagGroup) -> LowLevelILMutableExpression<ValueExpr> { + pub fn flag_group(&self, group: impl FlagGroup) -> LowLevelILMutableExpression<'_, ValueExpr> { use binaryninjacore_sys::BNLowLevelILAddExpr; use binaryninjacore_sys::BNLowLevelILOperation::LLIL_FLAG_GROUP; |
