]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / traits / impl-of-supertrait-has-wrong-lifetime-parameters.stderr
1 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
2   --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
3    |
4 LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
5    |             ^^^^^^^^^^
6    |
7 note: first, the lifetime cannot outlive the lifetime `'a` as defined here...
8   --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6
9    |
10 LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
11    |      ^^
12 note: ...but the lifetime must also be valid for the lifetime `'b` as defined here...
13   --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:9
14    |
15 LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
16    |         ^^
17 note: ...so that the types are compatible
18   --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
19    |
20 LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
21    |             ^^^^^^^^^^
22    = note: expected `T1<'a>`
23               found `T1<'_>`
24
25 error: aborting due to previous error
26
27 For more information about this error, try `rustc --explain E0495`.