]> git.proxmox.com Git - rustc.git/blame - 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
CommitLineData
dfeec247 1error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
136023e0 2 --> $DIR/issue-20831-debruijn.rs:28:8
dfeec247 3 |
74b04a01 4LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
136023e0 5 | ^^^^^^^^^
dfeec247 6 |
6a06907d
XL
7note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 28:58...
8 --> $DIR/issue-20831-debruijn.rs:28:58
dfeec247 9 |
3dfed10e 10LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
6a06907d 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
dfeec247
XL
12note: ...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 |
15LL | impl<'a> Publisher<'a> for MyStruct<'a> {
16 | ^^
17note: ...so that the types are compatible
136023e0 18 --> $DIR/issue-20831-debruijn.rs:28:8
dfeec247 19 |
74b04a01 20LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
136023e0 21 | ^^^^^^^^^
f9f354fc
XL
22 = note: expected `Publisher<'_>`
23 found `Publisher<'_>`
dfeec247 24
29967ef6 25error: aborting due to previous error
8faf50e0 26
29967ef6 27For more information about this error, try `rustc --explain E0495`.