2020-06-27 20:36:35 +00:00
|
|
|
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
|
2023-01-08 02:40:59 +00:00
|
|
|
--> $DIR/issue-20831-debruijn.rs:28:33
|
2018-07-19 04:10:35 +00:00
|
|
|
|
|
2023-01-08 02:40:59 +00:00
|
|
|
LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-07-19 04:10:35 +00:00
|
|
|
|
|
2021-10-05 12:11:51 +00:00
|
|
|
note: first, the lifetime cannot outlive the anonymous lifetime defined here...
|
2021-02-22 14:39:06 +00:00
|
|
|
--> $DIR/issue-20831-debruijn.rs:28:58
|
2018-07-19 04:10:35 +00:00
|
|
|
|
|
2020-09-07 09:01:45 +00:00
|
|
|
LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
|
2021-02-22 14:39:06 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-10-05 12:11:51 +00:00
|
|
|
note: ...but the lifetime must also be valid for the lifetime `'a` as defined here...
|
2020-01-08 17:02:10 +00:00
|
|
|
--> $DIR/issue-20831-debruijn.rs:26:6
|
|
|
|
|
|
|
|
|
LL | impl<'a> Publisher<'a> for MyStruct<'a> {
|
|
|
|
| ^^
|
|
|
|
note: ...so that the types are compatible
|
2023-01-08 02:40:59 +00:00
|
|
|
--> $DIR/issue-20831-debruijn.rs:28:33
|
2020-01-08 17:02:10 +00:00
|
|
|
|
|
2023-01-08 02:40:59 +00:00
|
|
|
LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-10-07 16:00:15 +00:00
|
|
|
= note: expected `<MyStruct<'a> as Publisher<'_>>`
|
|
|
|
found `<MyStruct<'_> as Publisher<'_>>`
|
2020-01-08 17:02:10 +00:00
|
|
|
|
2020-06-27 20:36:35 +00:00
|
|
|
error: aborting due to previous error
|
2018-07-15 21:11:54 +00:00
|
|
|
|
2020-06-27 20:36:35 +00:00
|
|
|
For more information about this error, try `rustc --explain E0495`.
|