rust/tests/ui/crashes/needless_lifetimes_impl_trait.stderr
Nilstrieb c2c73189c8 Bless clippy tests
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00

20 lines
557 B
Plaintext

error: the following explicit lifetimes could be elided: 'a
--> $DIR/needless_lifetimes_impl_trait.rs:15:12
|
LL | fn baz<'a>(&'a self) -> impl Foo + 'a {
| ^^ ^^ ^^
|
note: the lint level is defined here
--> $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 1 previous error