2023-11-27 15:54:03 -06:00
|
|
|
error: unnecessary lifetime parameter `'b`
|
2023-12-15 19:58:26 -06:00
|
|
|
--> $DIR/transitively-redundant-lifetimes.rs:3:10
|
2023-11-27 15:54:03 -06:00
|
|
|
|
|
|
|
|
LL | fn a<'a, 'b>(x: &'a &'b &'a ()) {}
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: you can use the `'a` lifetime directly, in place of `'b`
|
|
|
|
note: the lint level is defined here
|
2023-12-15 19:58:26 -06:00
|
|
|
--> $DIR/transitively-redundant-lifetimes.rs:1:9
|
2023-11-27 15:54:03 -06:00
|
|
|
|
|
2023-12-15 19:58:26 -06:00
|
|
|
LL | #![deny(redundant_lifetimes)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2023-11-27 15:54:03 -06:00
|
|
|
|
|
|
|
error: unnecessary lifetime parameter `'b`
|
2023-12-15 19:58:26 -06:00
|
|
|
--> $DIR/transitively-redundant-lifetimes.rs:5:14
|
2023-11-27 15:54:03 -06:00
|
|
|
|
|
|
|
|
LL | fn b<'a: 'b, 'b: 'a>() {}
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: you can use the `'a` lifetime directly, in place of `'b`
|
|
|
|
|
|
|
|
error: unnecessary lifetime parameter `'a`
|
2023-12-15 19:58:26 -06:00
|
|
|
--> $DIR/transitively-redundant-lifetimes.rs:8:6
|
2023-11-27 15:54:03 -06:00
|
|
|
|
|
|
|
|
LL | fn c<'a>(_: Foo<&'a ()>) {}
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: you can use the `'static` lifetime directly, in place of `'a`
|
|
|
|
|
2023-12-05 10:32:47 -06:00
|
|
|
error: unnecessary lifetime parameter `'a`
|
2023-12-15 19:58:26 -06:00
|
|
|
--> $DIR/transitively-redundant-lifetimes.rs:18:6
|
2023-12-05 10:32:47 -06:00
|
|
|
|
|
|
|
|
LL | impl<'a: 'static> Tr<'a> for () {}
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: you can use the `'static` lifetime directly, in place of `'a`
|
|
|
|
|
2023-11-27 15:54:03 -06:00
|
|
|
error: unnecessary lifetime parameter `'b`
|
2023-12-15 19:58:26 -06:00
|
|
|
--> $DIR/transitively-redundant-lifetimes.rs:12:10
|
2023-11-27 15:54:03 -06:00
|
|
|
|
|
|
|
|
LL | fn d<'b: 'a>(&'b self) {}
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: you can use the `'a` lifetime directly, in place of `'b`
|
|
|
|
|
2023-12-05 10:32:47 -06:00
|
|
|
error: aborting due to 5 previous errors
|
2023-11-27 15:54:03 -06:00
|
|
|
|