Skip to content

Commit

Permalink
Ignore needless_lifetimes clippy lint
Browse files Browse the repository at this point in the history
    warning: the following explicit lifetimes could be elided: 'a
       --> src/expand.rs:443:10
        |
    443 |     impl<'a> VisitMut for AssociatedTypeImplTraits<'a> {
        |          ^^                                        ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
        = note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
        = help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
    help: elide the lifetimes
        |
    443 -     impl<'a> VisitMut for AssociatedTypeImplTraits<'a> {
    443 +     impl VisitMut for AssociatedTypeImplTraits<'_> {
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> tests/test.rs:453:10
        |
    453 |     impl<'a> Trait2 for &'a () {
        |          ^^              ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
        = note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
        = help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
    help: elide the lifetimes
        |
    453 -     impl<'a> Trait2 for &'a () {
    453 +     impl Trait2 for &() {
        |

    warning: the following explicit lifetimes could be elided: 'a
        --> tests/test.rs:1431:10
         |
    1431 |     impl<'a> Drop for IncrementOnDrop<'a> {
         |          ^^                           ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1431 -     impl<'a> Drop for IncrementOnDrop<'a> {
    1431 +     impl Drop for IncrementOnDrop<'_> {
         |
  • Loading branch information
dtolnay committed Oct 6, 2024
1 parent 7553de3 commit b8a555a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@
clippy::items_after_statements,
clippy::match_like_matches_macro,
clippy::module_name_repetitions,
clippy::needless_lifetimes,
clippy::shadow_unrelated,
clippy::similar_names,
clippy::too_many_lines,
Expand Down
1 change: 1 addition & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
clippy::let_unit_value,
clippy::missing_panics_doc,
clippy::missing_safety_doc,
clippy::needless_lifetimes,
clippy::needless_return,
clippy::non_minimal_cfg,
clippy::trivially_copy_pass_by_ref,
Expand Down

0 comments on commit b8a555a

Please sign in to comment.