2022-11-21 13:34:47 -06:00
|
|
|
error: the following explicit lifetimes could be elided: 'a
|
2024-08-18 06:31:03 -05:00
|
|
|
--> tests/ui/crashes/needless_lifetimes_impl_trait.rs:12:6
|
2020-10-09 05:45:29 -05:00
|
|
|
|
|
2024-08-18 06:31:03 -05:00
|
|
|
LL | impl<'a> Foo for Baz<'a> {}
|
|
|
|
| ^^ ^^
|
2020-10-09 05:45:29 -05:00
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/crashes/needless_lifetimes_impl_trait.rs:1:9
|
2020-10-09 05:45:29 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::needless_lifetimes)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-02-10 07:01:19 -06:00
|
|
|
help: elide the lifetimes
|
|
|
|
|
|
2024-08-18 06:31:03 -05:00
|
|
|
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
|
|
|
|
|
|
2023-02-10 07:01:19 -06:00
|
|
|
LL - fn baz<'a>(&'a self) -> impl Foo + 'a {
|
|
|
|
LL + fn baz(&self) -> impl Foo + '_ {
|
|
|
|
|
|
2020-10-09 05:45:29 -05:00
|
|
|
|
2024-08-18 06:31:03 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2020-10-09 05:45:29 -05:00
|
|
|
|