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/display.rs:10:19
       |
    10 |     fn as_display<'a>(&'a self) -> Self::Target<'a>;
       |                   ^^   ^^                       ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    10 -     fn as_display<'a>(&'a self) -> Self::Target<'a>;
    10 +     fn as_display(&self) -> Self::Target<'_>;
       |

    warning: the following explicit lifetimes could be elided: 'a
      --> src/display.rs:21:19
       |
    21 |     fn as_display<'a>(&'a self) -> Self::Target<'a> {
       |                   ^^   ^^                       ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    21 -     fn as_display<'a>(&'a self) -> Self::Target<'a> {
    21 +     fn as_display(&self) -> Self::Target<'_> {
       |

    warning: the following explicit lifetimes could be elided: 'a
      --> src/display.rs:30:19
       |
    30 |     fn as_display<'a>(&'a self) -> Self::Target<'a> {
       |                   ^^   ^^                       ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    30 -     fn as_display<'a>(&'a self) -> Self::Target<'a> {
    30 +     fn as_display(&self) -> Self::Target<'_> {
       |

    warning: the following explicit lifetimes could be elided: 'a
      --> src/display.rs:39:19
       |
    39 |     fn as_display<'a>(&'a self) -> Self::Target<'a> {
       |                   ^^   ^^                       ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    39 -     fn as_display<'a>(&'a self) -> Self::Target<'a> {
    39 +     fn as_display(&self) -> Self::Target<'_> {
       |
  • Loading branch information
dtolnay committed Sep 2, 2023
1 parent 1f5cbd7 commit 140eb03
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 @@ -233,6 +233,7 @@
// Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7421
clippy::doc_markdown,
clippy::module_name_repetitions,
clippy::needless_lifetimes,
clippy::return_self_not_must_use,
clippy::wildcard_imports,
)]
Expand Down

0 comments on commit 140eb03

Please sign in to comment.