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/ptr.rs:72:6
       |
    72 | impl<'a, T> Copy for Ref<'a, T> where T: ?Sized {}
       |      ^^                  ^^
       |
       = 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
       |
    72 - impl<'a, T> Copy for Ref<'a, T> where T: ?Sized {}
    72 + impl<T> Copy for Ref<'_, T> where T: ?Sized {}
       |

    warning: the following explicit lifetimes could be elided: 'a
      --> src/ptr.rs:74:6
       |
    74 | impl<'a, T> Clone for Ref<'a, T>
       |      ^^                   ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    74 - impl<'a, T> Clone for Ref<'a, T>
    74 + impl<T> Clone for Ref<'_, T>
       |

    warning: the following explicit lifetimes could be elided: 'a
       --> src/ptr.rs:136:6
        |
    136 | impl<'a, T> Copy for Mut<'a, T> where T: ?Sized {}
        |      ^^                  ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    136 - impl<'a, T> Copy for Mut<'a, T> where T: ?Sized {}
    136 + impl<T> Copy for Mut<'_, T> where T: ?Sized {}
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> src/ptr.rs:138:6
        |
    138 | impl<'a, T> Clone for Mut<'a, T>
        |      ^^                   ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    138 - impl<'a, T> Clone for Mut<'a, T>
    138 + impl<T> Clone for Mut<'_, T>
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> src/ptr.rs:186:6
        |
    186 | impl<'a, T> Mut<'a, T> {
        |      ^^         ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    186 - impl<'a, T> Mut<'a, T> {
    186 + impl<T> Mut<'_, T> {
        |
  • Loading branch information
dtolnay committed Oct 6, 2024
1 parent be64707 commit 8ce4560
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
clippy::module_name_repetitions,
clippy::must_use_candidate,
clippy::needless_doctest_main,
clippy::needless_lifetimes,
clippy::new_ret_no_self,
clippy::redundant_else,
clippy::return_self_not_must_use,
Expand Down

0 comments on commit 8ce4560

Please sign in to comment.