54 lines
2.4 KiB
Plaintext
54 lines
2.4 KiB
Plaintext
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
|
|
--> $DIR/issue-55796.rs:18:9
|
|
|
|
|
LL | Box::new(self.out_edges(u).map(|e| e.target()))
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 7:17...
|
|
--> $DIR/issue-55796.rs:7:17
|
|
|
|
|
LL | pub trait Graph<'a> {
|
|
| ^^
|
|
note: ...so that the type `Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:18:40: 18:54]>` will meet its required lifetime bounds
|
|
--> $DIR/issue-55796.rs:18:9
|
|
|
|
|
LL | Box::new(self.out_edges(u).map(|e| e.target()))
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= note: but, the lifetime must be valid for the static lifetime...
|
|
note: ...so that the expression is assignable
|
|
--> $DIR/issue-55796.rs:18:9
|
|
|
|
|
LL | Box::new(self.out_edges(u).map(|e| e.target()))
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= note: expected `Box<(dyn Iterator<Item = <Self as Graph<'a>>::Node> + 'static)>`
|
|
found `Box<dyn Iterator<Item = <Self as Graph<'a>>::Node>>`
|
|
|
|
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
|
|
--> $DIR/issue-55796.rs:23:9
|
|
|
|
|
LL | Box::new(self.in_edges(u).map(|e| e.target()))
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 7:17...
|
|
--> $DIR/issue-55796.rs:7:17
|
|
|
|
|
LL | pub trait Graph<'a> {
|
|
| ^^
|
|
note: ...so that the type `Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:23:39: 23:53]>` will meet its required lifetime bounds
|
|
--> $DIR/issue-55796.rs:23:9
|
|
|
|
|
LL | Box::new(self.in_edges(u).map(|e| e.target()))
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= note: but, the lifetime must be valid for the static lifetime...
|
|
note: ...so that the expression is assignable
|
|
--> $DIR/issue-55796.rs:23:9
|
|
|
|
|
LL | Box::new(self.in_edges(u).map(|e| e.target()))
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= note: expected `Box<(dyn Iterator<Item = <Self as Graph<'a>>::Node> + 'static)>`
|
|
found `Box<dyn Iterator<Item = <Self as Graph<'a>>::Node>>`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0495`.
|