Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Nov 21, 2024
1 parent def4794 commit e4d2248
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions crates/revmc-cranelift/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,15 @@ pub struct EvmCraneliftBuilder<'a> {
symbols: Symbols,
}

impl<'a> BackendTypes for EvmCraneliftBuilder<'a> {
impl BackendTypes for EvmCraneliftBuilder<'_> {
type Type = <EvmCraneliftBackend as BackendTypes>::Type;
type Value = <EvmCraneliftBackend as BackendTypes>::Value;
type StackSlot = <EvmCraneliftBackend as BackendTypes>::StackSlot;
type BasicBlock = <EvmCraneliftBackend as BackendTypes>::BasicBlock;
type Function = <EvmCraneliftBackend as BackendTypes>::Function;
}

impl<'a> TypeMethods for EvmCraneliftBuilder<'a> {
impl TypeMethods for EvmCraneliftBuilder<'_> {
fn type_ptr(&self) -> Self::Type {
self.ptr_type
}
Expand Down
14 changes: 7 additions & 7 deletions crates/revmc-llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl<'ctx> BackendTypes for EvmLlvmBackend<'ctx> {
type Function = FunctionValue<'ctx>;
}

impl<'ctx> TypeMethods for EvmLlvmBackend<'ctx> {
impl TypeMethods for EvmLlvmBackend<'_> {
fn type_ptr(&self) -> Self::Type {
self.ty_ptr.into()
}
Expand Down Expand Up @@ -446,7 +446,7 @@ pub struct EvmLlvmBuilder<'a, 'ctx> {
function: FunctionValue<'ctx>,
}

impl<'a, 'ctx> std::ops::Deref for EvmLlvmBuilder<'a, 'ctx> {
impl<'ctx> std::ops::Deref for EvmLlvmBuilder<'_, 'ctx> {
type Target = EvmLlvmBackend<'ctx>;

#[inline]
Expand All @@ -455,14 +455,14 @@ impl<'a, 'ctx> std::ops::Deref for EvmLlvmBuilder<'a, 'ctx> {
}
}

impl<'a, 'ctx> std::ops::DerefMut for EvmLlvmBuilder<'a, 'ctx> {
impl std::ops::DerefMut for EvmLlvmBuilder<'_, '_> {
#[inline]
fn deref_mut(&mut self) -> &mut Self::Target {
self.backend
}
}

impl<'a, 'ctx> EvmLlvmBuilder<'a, 'ctx> {
impl<'ctx> EvmLlvmBuilder<'_, 'ctx> {
#[allow(dead_code)]
fn extract_value(
&mut self,
Expand Down Expand Up @@ -564,15 +564,15 @@ impl<'a, 'ctx> EvmLlvmBuilder<'a, 'ctx> {
}
}

impl<'a, 'ctx> BackendTypes for EvmLlvmBuilder<'a, 'ctx> {
impl<'ctx> BackendTypes for EvmLlvmBuilder<'_, 'ctx> {
type Type = <EvmLlvmBackend<'ctx> as BackendTypes>::Type;
type Value = <EvmLlvmBackend<'ctx> as BackendTypes>::Value;
type StackSlot = <EvmLlvmBackend<'ctx> as BackendTypes>::StackSlot;
type BasicBlock = <EvmLlvmBackend<'ctx> as BackendTypes>::BasicBlock;
type Function = <EvmLlvmBackend<'ctx> as BackendTypes>::Function;
}

impl<'a, 'ctx> TypeMethods for EvmLlvmBuilder<'a, 'ctx> {
impl TypeMethods for EvmLlvmBuilder<'_, '_> {
fn type_ptr(&self) -> Self::Type {
self.backend.type_ptr()
}
Expand All @@ -594,7 +594,7 @@ impl<'a, 'ctx> TypeMethods for EvmLlvmBuilder<'a, 'ctx> {
}
}

impl<'a, 'ctx> Builder for EvmLlvmBuilder<'a, 'ctx> {
impl Builder for EvmLlvmBuilder<'_, '_> {
fn create_block(&mut self, name: &str) -> Self::BasicBlock {
self.cx.append_basic_block(self.function, name)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/revmc-llvm/src/orc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ pub struct ExecutionSessionRef<'ee> {
_marker: PhantomData<&'ee ()>,
}

impl<'ee> ExecutionSessionRef<'ee> {
impl ExecutionSessionRef<'_> {
/// Wraps a raw pointer.
pub unsafe fn from_inner(es: LLVMOrcExecutionSessionRef) -> Self {
Self { es, _marker: PhantomData }
Expand Down
2 changes: 1 addition & 1 deletion crates/revmc/src/compiler/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@ impl<'a, B: Backend> FunctionCx<'a, B> {
}

/// IR builtins.
impl<'a, B: Backend> FunctionCx<'a, B> {
impl<B: Backend> FunctionCx<'_, B> {
fn call_byte(&mut self, index: B::Value, value: B::Value) -> B::Value {
self.call_ir_binop_builtin("byte", index, value, Self::build_byte)
}
Expand Down

0 comments on commit e4d2248

Please sign in to comment.