Skip to content

Commit

Permalink
Fix clippy::needless_lifetimes warnings (new in `nightly-2024-10-04…
Browse files Browse the repository at this point in the history
…`). (#5)

Was left out of #3 because they
just got added/enabled.
  • Loading branch information
eddyb authored Oct 4, 2024
2 parents 65d95b5 + 4743a04 commit 6c12f5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/func_at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<'a> Iterator for FuncAt<'a, EntityListIter<DataInst>> {
}
}

impl<'a> DoubleEndedIterator for FuncAt<'a, EntityListIter<DataInst>> {
impl DoubleEndedIterator for FuncAt<'_, EntityListIter<DataInst>> {
fn next_back(&mut self) -> Option<Self::Item> {
let (prev, rest) = self.position.split_last(self.data_insts)?;
self.position = rest;
Expand Down
2 changes: 1 addition & 1 deletion src/print/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ impl Printer<'_> {
}
}

impl<'a> Printer<'a> {
impl Printer<'_> {
/// Pretty-print a string literal with escaping and styling.
//
// FIXME(eddyb) add methods like this for all styled text (e.g. numeric literals).
Expand Down
6 changes: 3 additions & 3 deletions src/spv/lift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ enum ControlParent {
ControlNode(ControlNode),
}

impl<'a, 'p> FuncAt<'a, CfgCursor<'p>> {
impl<'p> FuncAt<'_, CfgCursor<'p>> {
/// Return the next [`CfgPoint`] (wrapped in [`CfgCursor`]) in a linear
/// chain within structured control-flow (i.e. no branching to child regions).
fn unique_successor(self) -> Option<CfgCursor<'p>> {
Expand Down Expand Up @@ -461,7 +461,7 @@ impl<'a, 'p> FuncAt<'a, CfgCursor<'p>> {
}
}

impl<'a> FuncAt<'a, ControlRegion> {
impl FuncAt<'_, ControlRegion> {
/// Traverse every [`CfgPoint`] (deeply) contained in this [`ControlRegion`],
/// in reverse post-order (RPO), with `f` receiving each [`CfgPoint`]
/// in turn (wrapped in [`CfgCursor`], for further traversal flexibility),
Expand Down Expand Up @@ -493,7 +493,7 @@ impl<'a> FuncAt<'a, ControlRegion> {
}
}

impl<'a> FuncAt<'a, ControlNode> {
impl FuncAt<'_, ControlNode> {
fn rev_post_order_try_for_each_inner<E>(
self,
f: &mut impl FnMut(CfgCursor<'_>) -> Result<(), E>,
Expand Down

0 comments on commit 6c12f5a

Please sign in to comment.