rust-clippy/tests/ui/crashes/needless_lifetimes_impl_trait.stderr

20 lines
554 B
Text
Raw Normal View History

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