Skip to content

Commit

Permalink
cargo clippy --fix
Browse files Browse the repository at this point in the history
`needless_lifetimes` seems to be on by default now.
  • Loading branch information
tamird committed Nov 29, 2024
1 parent ccf6a2d commit 621748f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/llvm/types/di.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub struct DIFile<'ctx> {
_marker: PhantomData<&'ctx ()>,
}

impl<'ctx> DIFile<'ctx> {
impl DIFile<'_> {
/// Constructs a new [`DIFile`] from the given `metadata`.
///
/// # Safety
Expand Down Expand Up @@ -114,7 +114,7 @@ pub struct DIType<'ctx> {
_marker: PhantomData<&'ctx ()>,
}

impl<'ctx> DIType<'ctx> {
impl DIType<'_> {
/// Constructs a new [`DIType`] from the given `value`.
///
/// # Safety
Expand Down Expand Up @@ -165,7 +165,7 @@ pub struct DIDerivedType<'ctx> {
_marker: PhantomData<&'ctx ()>,
}

impl<'ctx> DIDerivedType<'ctx> {
impl DIDerivedType<'_> {
/// Constructs a new [`DIDerivedType`] from the given `value`.
///
/// # Safety
Expand Down Expand Up @@ -226,7 +226,7 @@ pub struct DICompositeType<'ctx> {
_marker: PhantomData<&'ctx ()>,
}

impl<'ctx> DICompositeType<'ctx> {
impl DICompositeType<'_> {
/// Constructs a new [`DICompositeType`] from the given `value`.
///
/// # Safety
Expand Down Expand Up @@ -328,7 +328,7 @@ pub struct DISubprogram<'ctx> {
_marker: PhantomData<&'ctx ()>,
}

impl<'ctx> DISubprogram<'ctx> {
impl DISubprogram<'_> {
/// Constructs a new [`DISubprogram`] from the given `value`.
///
/// # Safety
Expand Down
8 changes: 4 additions & 4 deletions src/llvm/types/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub enum Value<'ctx> {
Other(LLVMValueRef),
}

impl<'ctx> std::fmt::Debug for Value<'ctx> {
impl std::fmt::Debug for Value<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let value_to_string = |value| {
Message {
Expand Down Expand Up @@ -74,7 +74,7 @@ impl<'ctx> std::fmt::Debug for Value<'ctx> {
}
}

impl<'ctx> Value<'ctx> {
impl Value<'_> {
pub fn new(value: LLVMValueRef) -> Self {
if unsafe { !LLVMIsAMDNode(value).is_null() } {
let mdnode = unsafe { MDNode::from_value_ref(value) };
Expand Down Expand Up @@ -115,7 +115,7 @@ pub enum Metadata<'ctx> {
Other(#[allow(dead_code)] LLVMValueRef),
}

impl<'ctx> Metadata<'ctx> {
impl Metadata<'_> {
/// Constructs a new [`Metadata`] from the given `value`.
///
/// # Safety
Expand Down Expand Up @@ -193,7 +193,7 @@ pub struct MDNode<'ctx> {
_marker: PhantomData<&'ctx ()>,
}

impl<'ctx> MDNode<'ctx> {
impl MDNode<'_> {
/// Constructs a new [`MDNode`] from the given `metadata`.
///
/// # Safety
Expand Down

0 comments on commit 621748f

Please sign in to comment.