2022-05-10 19:15:30 +00:00
|
|
|
error: lifetime parameter `'f` only used once
|
|
|
|
--> $DIR/one-use-in-inherent-method-argument.rs:11:6
|
2018-05-03 22:43:28 +00:00
|
|
|
|
|
2022-05-10 19:15:30 +00:00
|
|
|
LL | impl<'f> Foo<'f> {
|
|
|
|
| ^^ -- ...is used only here
|
|
|
|
| |
|
|
|
|
| this lifetime...
|
2018-05-03 22:43:28 +00:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/one-use-in-inherent-method-argument.rs:1:9
|
2018-05-03 22:43:28 +00:00
|
|
|
|
|
2018-05-18 22:13:53 +00:00
|
|
|
LL | #![deny(single_use_lifetimes)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
2018-10-28 06:40:56 +00:00
|
|
|
help: elide the single-use lifetime
|
|
|
|
|
|
2022-05-10 19:15:30 +00:00
|
|
|
LL - impl<'f> Foo<'f> {
|
|
|
|
LL + impl Foo<'_> {
|
2022-06-08 17:34:57 +00:00
|
|
|
|
|
2018-05-03 22:43:28 +00:00
|
|
|
|
2022-05-10 19:15:30 +00:00
|
|
|
error: lifetime parameter `'a` only used once
|
|
|
|
--> $DIR/one-use-in-inherent-method-argument.rs:13:19
|
2018-05-03 22:43:28 +00:00
|
|
|
|
|
2022-05-10 19:15:30 +00:00
|
|
|
LL | fn inherent_a<'a>(&self, data: &'a u32) {
|
|
|
|
| ^^ -- ...is used only here
|
|
|
|
| |
|
|
|
|
| this lifetime...
|
|
|
|
|
|
|
|
|
help: elide the single-use lifetime
|
|
|
|
|
|
|
|
|
LL - fn inherent_a<'a>(&self, data: &'a u32) {
|
|
|
|
LL + fn inherent_a(&self, data: &u32) {
|
2022-06-08 17:34:57 +00:00
|
|
|
|
|
2018-05-03 22:43:28 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|