mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
error: unnecessary lifetime parameter `'b`
|
|
--> $DIR/transitively-redundant-lifetimes.rs:3:10
|
|
|
|
|
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
|
|
--> $DIR/transitively-redundant-lifetimes.rs:1:9
|
|
|
|
|
LL | #![deny(redundant_lifetimes)]
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: unnecessary lifetime parameter `'b`
|
|
--> $DIR/transitively-redundant-lifetimes.rs:5:14
|
|
|
|
|
LL | fn b<'a: 'b, 'b: 'a>() {}
|
|
| ^^
|
|
|
|
|
= note: you can use the `'a` lifetime directly, in place of `'b`
|
|
|
|
error: unnecessary lifetime parameter `'a`
|
|
--> $DIR/transitively-redundant-lifetimes.rs:8:6
|
|
|
|
|
LL | fn c<'a>(_: Foo<&'a ()>) {}
|
|
| ^^
|
|
|
|
|
= note: you can use the `'static` lifetime directly, in place of `'a`
|
|
|
|
error: unnecessary lifetime parameter `'a`
|
|
--> $DIR/transitively-redundant-lifetimes.rs:18:6
|
|
|
|
|
LL | impl<'a: 'static> Tr<'a> for () {}
|
|
| ^^
|
|
|
|
|
= note: you can use the `'static` lifetime directly, in place of `'a`
|
|
|
|
error: unnecessary lifetime parameter `'b`
|
|
--> $DIR/transitively-redundant-lifetimes.rs:12:10
|
|
|
|
|
LL | fn d<'b: 'a>(&'b self) {}
|
|
| ^^
|
|
|
|
|
= note: you can use the `'a` lifetime directly, in place of `'b`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|