Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Compiling SbWiki v0.0.1 (file:///home/perillamint/rust/SbWiki/SbWiki)
- main.rs:44:25: 44:67 error: cannot infer an appropriate lifetime for capture of `self` by closure due to conflicting requirements
- main.rs:44 |req: &mut Request| self.wikiredirect(req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- main.rs:37:37: 61:6 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the block at 37:36...
- main.rs:37 pub fn open(&self, isTLS: bool) {
- main.rs:38 let mut wikidocument = self.wikipath.clone();
- main.rs:39 wikidocument.push_str("/*");
- main.rs:40
- main.rs:41 //TODO: fetch it from toml config.
- main.rs:42
- ...
- main.rs:43:21: 44:68 note: ...so that the reference type `&&SbWikiServer` does not outlive the data it points at
- main.rs:43 self.router.get(self.wikipath.as_slice(),
- main.rs:44 |req: &mut Request| self.wikiredirect(req));
- note: but, the lifetime must be valid for the static lifetime...
- main.rs:43:21: 44:68 note: ...so that captured variable `self` does not outlive the enclosing closure
- main.rs:43 self.router.get(self.wikipath.as_slice(),
- main.rs:44 |req: &mut Request| self.wikiredirect(req));
- main.rs:47:25: 47:66 error: cannot infer an appropriate lifetime for capture of `self` by closure due to conflicting requirements
- main.rs:47 |req: &mut Request| self.wikihandler(req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- main.rs:47:25: 47:66 note: first, the lifetime cannot outlive the expression at 47:24...
- main.rs:47 |req: &mut Request| self.wikihandler(req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- main.rs:47:25: 47:66 note: ...so that captured variable `self` does not outlive the enclosing closure
- main.rs:47 |req: &mut Request| self.wikihandler(req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- main.rs:46:9: 47:67 note: but, the lifetime must be valid for the method call at 46:8...
- main.rs:46 self.router.get(wikidocument.as_slice(),
- main.rs:47 |req: &mut Request| self.wikihandler(req));
- main.rs:46:9: 47:67 note: ...so that captured variable `self` does not outlive the enclosing closure
- main.rs:46 self.router.get(wikidocument.as_slice(),
- main.rs:47 |req: &mut Request| self.wikihandler(req));
- main.rs:50:25: 50:66 error: cannot infer an appropriate lifetime for capture of `self` by closure due to conflicting requirements
- main.rs:50 |req: &mut Request| self.roothandler(req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- main.rs:37:37: 61:6 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the block at 37:36...
- main.rs:37 pub fn open(&self, isTLS: bool) {
- main.rs:38 let mut wikidocument = self.wikipath.clone();
- main.rs:39 wikidocument.push_str("/*");
- main.rs:40
- main.rs:41 //TODO: fetch it from toml config.
- main.rs:42
- ...
- main.rs:49:21: 50:67 note: ...so that the reference type `&&SbWikiServer` does not outlive the data it points at
- main.rs:49 self.router.get("/",
- main.rs:50 |req: &mut Request| self.roothandler(req));
- note: but, the lifetime must be valid for the static lifetime...
- main.rs:49:21: 50:67 note: ...so that captured variable `self` does not outlive the enclosing closure
- main.rs:49 self.router.get("/",
- main.rs:50 |req: &mut Request| self.roothandler(req));
- main.rs:52:25: 52:66 error: cannot infer an appropriate lifetime for capture of `self` by closure due to conflicting requirements
- main.rs:52 |req: &mut Request| self.roothandler(req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- main.rs:37:37: 61:6 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the block at 37:36...
- main.rs:37 pub fn open(&self, isTLS: bool) {
- main.rs:38 let mut wikidocument = self.wikipath.clone();
- main.rs:39 wikidocument.push_str("/*");
- main.rs:40
- main.rs:41 //TODO: fetch it from toml config.
- main.rs:42
- ...
- main.rs:51:21: 52:67 note: ...so that the reference type `&&SbWikiServer` does not outlive the data it points at
- main.rs:51 self.router.get("/:query",
- main.rs:52 |req: &mut Request| self.roothandler(req));
- note: but, the lifetime must be valid for the static lifetime...
- main.rs:51:21: 52:67 note: ...so that captured variable `self` does not outlive the enclosing closure
- main.rs:51 self.router.get("/:query",
- main.rs:52 |req: &mut Request| self.roothandler(req));
- error: aborting due to 4 previous errors
- Could not compile `SbWiki`.
- To learn more, run the command again with --verbose.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement