Advertisement
Guest User

Untitled

a guest
May 29th, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. Compiling SbWiki v0.0.1 (file:///home/perillamint/rust/SbWiki/SbWiki)
  2. main.rs:44:25: 44:67 error: cannot infer an appropriate lifetime for capture of `self` by closure due to conflicting requirements
  3. main.rs:44 |req: &mut Request| self.wikiredirect(req));
  4. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. main.rs:37:37: 61:6 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the block at 37:36...
  6. main.rs:37 pub fn open(&self, isTLS: bool) {
  7. main.rs:38 let mut wikidocument = self.wikipath.clone();
  8. main.rs:39 wikidocument.push_str("/*");
  9. main.rs:40
  10. main.rs:41 //TODO: fetch it from toml config.
  11. main.rs:42
  12. ...
  13. main.rs:43:21: 44:68 note: ...so that the reference type `&&SbWikiServer` does not outlive the data it points at
  14. main.rs:43 self.router.get(self.wikipath.as_slice(),
  15. main.rs:44 |req: &mut Request| self.wikiredirect(req));
  16. note: but, the lifetime must be valid for the static lifetime...
  17. main.rs:43:21: 44:68 note: ...so that captured variable `self` does not outlive the enclosing closure
  18. main.rs:43 self.router.get(self.wikipath.as_slice(),
  19. main.rs:44 |req: &mut Request| self.wikiredirect(req));
  20. main.rs:47:25: 47:66 error: cannot infer an appropriate lifetime for capture of `self` by closure due to conflicting requirements
  21. main.rs:47 |req: &mut Request| self.wikihandler(req));
  22. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  23. main.rs:47:25: 47:66 note: first, the lifetime cannot outlive the expression at 47:24...
  24. main.rs:47 |req: &mut Request| self.wikihandler(req));
  25. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. main.rs:47:25: 47:66 note: ...so that captured variable `self` does not outlive the enclosing closure
  27. main.rs:47 |req: &mut Request| self.wikihandler(req));
  28. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. main.rs:46:9: 47:67 note: but, the lifetime must be valid for the method call at 46:8...
  30. main.rs:46 self.router.get(wikidocument.as_slice(),
  31. main.rs:47 |req: &mut Request| self.wikihandler(req));
  32. main.rs:46:9: 47:67 note: ...so that captured variable `self` does not outlive the enclosing closure
  33. main.rs:46 self.router.get(wikidocument.as_slice(),
  34. main.rs:47 |req: &mut Request| self.wikihandler(req));
  35. main.rs:50:25: 50:66 error: cannot infer an appropriate lifetime for capture of `self` by closure due to conflicting requirements
  36. main.rs:50 |req: &mut Request| self.roothandler(req));
  37. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38. main.rs:37:37: 61:6 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the block at 37:36...
  39. main.rs:37 pub fn open(&self, isTLS: bool) {
  40. main.rs:38 let mut wikidocument = self.wikipath.clone();
  41. main.rs:39 wikidocument.push_str("/*");
  42. main.rs:40
  43. main.rs:41 //TODO: fetch it from toml config.
  44. main.rs:42
  45. ...
  46. main.rs:49:21: 50:67 note: ...so that the reference type `&&SbWikiServer` does not outlive the data it points at
  47. main.rs:49 self.router.get("/",
  48. main.rs:50 |req: &mut Request| self.roothandler(req));
  49. note: but, the lifetime must be valid for the static lifetime...
  50. main.rs:49:21: 50:67 note: ...so that captured variable `self` does not outlive the enclosing closure
  51. main.rs:49 self.router.get("/",
  52. main.rs:50 |req: &mut Request| self.roothandler(req));
  53. main.rs:52:25: 52:66 error: cannot infer an appropriate lifetime for capture of `self` by closure due to conflicting requirements
  54. main.rs:52 |req: &mut Request| self.roothandler(req));
  55. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56. main.rs:37:37: 61:6 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the block at 37:36...
  57. main.rs:37 pub fn open(&self, isTLS: bool) {
  58. main.rs:38 let mut wikidocument = self.wikipath.clone();
  59. main.rs:39 wikidocument.push_str("/*");
  60. main.rs:40
  61. main.rs:41 //TODO: fetch it from toml config.
  62. main.rs:42
  63. ...
  64. main.rs:51:21: 52:67 note: ...so that the reference type `&&SbWikiServer` does not outlive the data it points at
  65. main.rs:51 self.router.get("/:query",
  66. main.rs:52 |req: &mut Request| self.roothandler(req));
  67. note: but, the lifetime must be valid for the static lifetime...
  68. main.rs:51:21: 52:67 note: ...so that captured variable `self` does not outlive the enclosing closure
  69. main.rs:51 self.router.get("/:query",
  70. main.rs:52 |req: &mut Request| self.roothandler(req));
  71. error: aborting due to 4 previous errors
  72. Could not compile `SbWiki`.
  73.  
  74. To learn more, run the command again with --verbose.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement