Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy on the nightly version complains about explicit lifetimes that could be elided in the autogenerated code #522

Open
ariel-miculas opened this issue Oct 4, 2024 · 0 comments

Comments

@ariel-miculas
Copy link
Contributor

Examples from a PuzzleFS action:

error: the following explicit lifetimes could be elided: 'a
  --> /home/amiculas/work/cisco/puzzlefs/target/debug/build/puzzlefs-lib-d2835cfcf1bcc89b/out/metadata_capnp.rs:15:9
   |
15 |   impl <'a,> ::core::marker::Copy for Reader<'a,>  {}
   |         ^^                                   ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
   |
15 -   impl <'a,> ::core::marker::Copy for Reader<'a,>  {}
15 +   impl  ::core::marker::Copy for Reader<'_,>  {}
   |

error: the following explicit lifetimes could be elided: 'a
  --> /home/amiculas/work/cisco/puzzlefs/target/debug/build/puzzlefs-lib-d2835cfcf1bcc89b/out/metadata_capnp.rs:16:9
   |
16 |   impl <'a,> ::core::clone::Clone for Reader<'a,>  {
   |         ^^                                   ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
16 -   impl <'a,> ::core::clone::Clone for Reader<'a,>  {
16 +   impl  ::core::clone::Clone for Reader<'_,>  {
   |

error: the following explicit lifetimes could be elided: 'a
  --> /home/amiculas/work/cisco/puzzlefs/target/debug/build/puzzlefs-lib-d2835cfcf1bcc89b/out/metadata_capnp.rs:20:9
   |
20 |   impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,>  {
   |         ^^                                         ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
20 -   impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,>  {
20 +   impl  ::capnp::traits::HasTypeId for Reader<'_,>  {
   |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant