]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-20831-debruijn.stderr
New upstream version 1.45.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-20831-debruijn.stderr
CommitLineData
8faf50e0 1error[E0308]: mismatched types
0731742a 2 --> $DIR/issue-20831-debruijn.rs:28:5
8faf50e0 3 |
dc9dc135 4LL | / fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
8faf50e0 5LL | | // Not obvious, but there is an implicit lifetime here -------^
532ac7d7
XL
6LL | |
7LL | |
8faf50e0
XL
8... |
9LL | | self.sub = t;
10LL | | }
11 | |_____^ lifetime mismatch
12 |
13 = note: expected type `'a`
532ac7d7 14 found type `'_`
0731742a
XL
15note: the anonymous lifetime #2 defined on the method body at 28:5...
16 --> $DIR/issue-20831-debruijn.rs:28:5
8faf50e0 17 |
dc9dc135 18LL | / fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
8faf50e0 19LL | | // Not obvious, but there is an implicit lifetime here -------^
532ac7d7
XL
20LL | |
21LL | |
8faf50e0
XL
22... |
23LL | | self.sub = t;
24LL | | }
25 | |_____^
e74abb32 26note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 26:6
0731742a 27 --> $DIR/issue-20831-debruijn.rs:26:6
8faf50e0
XL
28 |
29LL | impl<'a> Publisher<'a> for MyStruct<'a> {
30 | ^^
31
32error[E0308]: mismatched types
0731742a 33 --> $DIR/issue-20831-debruijn.rs:28:5
8faf50e0 34 |
dc9dc135 35LL | / fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
8faf50e0 36LL | | // Not obvious, but there is an implicit lifetime here -------^
532ac7d7
XL
37LL | |
38LL | |
8faf50e0
XL
39... |
40LL | | self.sub = t;
41LL | | }
42 | |_____^ lifetime mismatch
43 |
44 = note: expected type `'a`
532ac7d7 45 found type `'_`
e74abb32 46note: the lifetime `'a` as defined on the impl at 26:6...
0731742a 47 --> $DIR/issue-20831-debruijn.rs:26:6
8faf50e0
XL
48 |
49LL | impl<'a> Publisher<'a> for MyStruct<'a> {
50 | ^^
0731742a
XL
51note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 28:5
52 --> $DIR/issue-20831-debruijn.rs:28:5
8faf50e0 53 |
dc9dc135 54LL | / fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
8faf50e0 55LL | | // Not obvious, but there is an implicit lifetime here -------^
532ac7d7
XL
56LL | |
57LL | |
8faf50e0
XL
58... |
59LL | | self.sub = t;
60LL | | }
61 | |_____^
62
63error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
74b04a01 64 --> $DIR/issue-20831-debruijn.rs:28:33
8faf50e0 65 |
74b04a01
XL
66LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8faf50e0 68 |
0731742a
XL
69note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 28:5...
70 --> $DIR/issue-20831-debruijn.rs:28:5
8faf50e0 71 |
dc9dc135 72LL | / fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
8faf50e0 73LL | | // Not obvious, but there is an implicit lifetime here -------^
532ac7d7
XL
74LL | |
75LL | |
8faf50e0
XL
76... |
77LL | | self.sub = t;
78LL | | }
79 | |_____^
e74abb32 80note: ...but the lifetime must also be valid for the lifetime `'a` as defined on the impl at 26:6...
0731742a 81 --> $DIR/issue-20831-debruijn.rs:26:6
8faf50e0
XL
82 |
83LL | impl<'a> Publisher<'a> for MyStruct<'a> {
84 | ^^
60c5eb7d 85note: ...so that the types are compatible
74b04a01 86 --> $DIR/issue-20831-debruijn.rs:28:33
60c5eb7d 87 |
74b04a01
XL
88LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
89 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
f9f354fc
XL
90 = note: expected `Publisher<'_>`
91 found `Publisher<'_>`
8faf50e0 92
dfeec247 93error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
74b04a01 94 --> $DIR/issue-20831-debruijn.rs:28:33
dfeec247 95 |
74b04a01
XL
96LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dfeec247
XL
98 |
99note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 28:5...
100 --> $DIR/issue-20831-debruijn.rs:28:5
101 |
102LL | / fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
103LL | | // Not obvious, but there is an implicit lifetime here -------^
104LL | |
105LL | |
106... |
107LL | | self.sub = t;
108LL | | }
109 | |_____^
110note: ...but the lifetime must also be valid for the lifetime `'a` as defined on the impl at 26:6...
111 --> $DIR/issue-20831-debruijn.rs:26:6
112 |
113LL | impl<'a> Publisher<'a> for MyStruct<'a> {
114 | ^^
115note: ...so that the types are compatible
74b04a01 116 --> $DIR/issue-20831-debruijn.rs:28:33
dfeec247 117 |
74b04a01
XL
118LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
119 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
f9f354fc
XL
120 = note: expected `Publisher<'_>`
121 found `Publisher<'_>`
dfeec247
XL
122
123error: aborting due to 4 previous errors
8faf50e0 124
e74abb32
XL
125Some errors have detailed explanations: E0308, E0495.
126For more information about an error, try `rustc --explain E0308`.