mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
31 lines
874 B
Text
31 lines
874 B
Text
error: the following explicit lifetimes could be elided: 'a
|
|
--> tests/ui/crashes/needless_lifetimes_impl_trait.rs:12:6
|
|
|
|
|
LL | impl<'a> Foo for Baz<'a> {}
|
|
| ^^ ^^
|
|
|
|
|
note: the lint level is defined here
|
|
--> tests/ui/crashes/needless_lifetimes_impl_trait.rs:1:9
|
|
|
|
|
LL | #![deny(clippy::needless_lifetimes)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
help: elide the lifetimes
|
|
|
|
|
LL - impl<'a> Foo for Baz<'a> {}
|
|
LL + impl Foo for Baz<'_> {}
|
|
|
|
|
|
|
error: the following explicit lifetimes could be elided: 'a
|
|
--> tests/ui/crashes/needless_lifetimes_impl_trait.rs:15:12
|
|
|
|
|
LL | fn baz<'a>(&'a self) -> impl Foo + 'a {
|
|
| ^^ ^^ ^^
|
|
|
|
|
help: elide the lifetimes
|
|
|
|
|
LL - fn baz<'a>(&'a self) -> impl Foo + 'a {
|
|
LL + fn baz(&self) -> impl Foo + '_ {
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|