fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements 2 --> $DIR/issue-20831-debruijn.rs:28:33 3 | 4LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) { 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 | 7note: first, the lifetime cannot outlive the anonymous lifetime defined here... 8 --> $DIR/issue-20831-debruijn.rs:28:58 9 | 10LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) { 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12note: ...but the lifetime must also be valid for the lifetime `'a` as defined here... 13 --> $DIR/issue-20831-debruijn.rs:26:6 14 | 15LL | impl<'a> Publisher<'a> for MyStruct<'a> { 16 | ^^ 17note: ...so that the types are compatible 18 --> $DIR/issue-20831-debruijn.rs:28:33 19 | 20LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) { 21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 22 = note: expected `<MyStruct<'a> as Publisher<'_>>` 23 found `<MyStruct<'_> as Publisher<'_>>` 24 25error: aborting due to previous error 26 27For more information about this error, try `rustc --explain E0495`.