1 error[E0308]: mismatched types
2 --> $DIR/issue-20831-debruijn.rs:38:5
4 LL | / fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
5 LL | | // Not obvious, but there is an implicit lifetime here -------^
6 LL | | //~^^ ERROR cannot infer
7 LL | | //~| ERROR mismatched types
11 | |_____^ lifetime mismatch
13 = note: expected type `'a`
15 note: the anonymous lifetime #2 defined on the method body at 38:5...
16 --> $DIR/issue-20831-debruijn.rs:38:5
18 LL | / fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
19 LL | | // Not obvious, but there is an implicit lifetime here -------^
20 LL | | //~^^ ERROR cannot infer
21 LL | | //~| ERROR mismatched types
26 note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 36:6
27 --> $DIR/issue-20831-debruijn.rs:36:6
29 LL | impl<'a> Publisher<'a> for MyStruct<'a> {
32 error[E0308]: mismatched types
33 --> $DIR/issue-20831-debruijn.rs:38:5
35 LL | / fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
36 LL | | // Not obvious, but there is an implicit lifetime here -------^
37 LL | | //~^^ ERROR cannot infer
38 LL | | //~| ERROR mismatched types
42 | |_____^ lifetime mismatch
44 = note: expected type `'a`
46 note: the lifetime 'a as defined on the impl at 36:6...
47 --> $DIR/issue-20831-debruijn.rs:36:6
49 LL | impl<'a> Publisher<'a> for MyStruct<'a> {
51 note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 38:5
52 --> $DIR/issue-20831-debruijn.rs:38:5
54 LL | / fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
55 LL | | // Not obvious, but there is an implicit lifetime here -------^
56 LL | | //~^^ ERROR cannot infer
57 LL | | //~| ERROR mismatched types
63 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
64 --> $DIR/issue-20831-debruijn.rs:38:5
66 LL | / fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
67 LL | | // Not obvious, but there is an implicit lifetime here -------^
68 LL | | //~^^ ERROR cannot infer
69 LL | | //~| ERROR mismatched types
75 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 38:5...
76 --> $DIR/issue-20831-debruijn.rs:38:5
78 LL | / fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
79 LL | | // Not obvious, but there is an implicit lifetime here -------^
80 LL | | //~^^ ERROR cannot infer
81 LL | | //~| ERROR mismatched types
86 note: ...but the lifetime must also be valid for the lifetime 'a as defined on the impl at 36:6...
87 --> $DIR/issue-20831-debruijn.rs:36:6
89 LL | impl<'a> Publisher<'a> for MyStruct<'a> {
91 = note: ...so that the types are compatible:
92 expected Publisher<'_>
95 error: aborting due to 3 previous errors
97 Some errors occurred: E0308, E0495.
98 For more information about an error, try `rustc --explain E0308`.