2022-10-28 12:18:07 -05:00
|
|
|
error: the following explicit lifetimes could be elided: 'a
|
2023-06-13 14:05:22 -05:00
|
|
|
--> $DIR/needless_lifetimes_impl_trait.rs:15:12
|
2020-09-07 19:39:39 -05:00
|
|
|
|
|
|
|
|
LL | fn baz<'a>(&'a self) -> impl Foo + 'a {
|
2023-06-13 14:05:22 -05:00
|
|
|
| ^^ ^^ ^^
|
2020-09-07 19:39:39 -05:00
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2020-09-29 16:06:08 -05:00
|
|
|
--> $DIR/needless_lifetimes_impl_trait.rs:1:9
|
2020-09-07 19:39:39 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::needless_lifetimes)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-01-31 08:12:03 -06:00
|
|
|
help: elide the lifetimes
|
|
|
|
|
|
|
|
|
LL - fn baz<'a>(&'a self) -> impl Foo + 'a {
|
|
|
|
LL + fn baz(&self) -> impl Foo + '_ {
|
|
|
|
|
|
2020-09-07 19:39:39 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|