Advertisement
Guest User

Untitled

a guest
Jan 31st, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
  2. --> nexus/servant/src/db/db.rs:58:22
  3. |
  4. 58 | .query_one(&self.query_documents, &[&w_id])
  5. | ^^^^^^^^^
  6. |
  7. note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 52:5...
  8. --> nexus/servant/src/db/db.rs:52:5
  9. |
  10. 52 | / fn handle(&mut self, msg: QueryDocuments, _: &mut Self::Context) -> Self::Result {
  11. 53 | | let documents = FuturesUnordered::new();
  12. 54 | | for _ in 0..msg.0 {
  13. 55 | | let w_id = 1 as i32;
  14. ... |
  15. 72 | | Box::pin(documents.try_collect())
  16. 73 | | }
  17. | |_____^
  18. note: ...so that reference does not outlive borrowed content
  19. --> nexus/servant/src/db/db.rs:57:17
  20. |
  21. 57 | self.client
  22. | ^^^^^^^^^^^
  23. = note: but, the lifetime must be valid for the static lifetime...
  24. note: ...so that the expression is assignable
  25. --> nexus/servant/src/db/db.rs:72:9
  26. |
  27. 72 | Box::pin(documents.try_collect())
  28. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement