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