capnproto-rust
capnproto-rust copied to clipboard
Clippy on the nightly version complains about explicit lifetimes that could be elided in the autogenerated code
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<'_,> {
|