{"action":"created","issue":{"url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/260","labels_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/260/labels{/name}","comments_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/260/comments","events_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/260/events","html_url":"https://github.com/nickel-org/nickel.rs/pull/260","id":101024421,"number":260,"title":"Fix region errors uncovered by rust-lang/rust#27641","user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-14T14:42:03Z","updated_at":"2015-08-14T19:04:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nickel-org/nickel.rs/pulls/260","html_url":"https://github.com/nickel-org/nickel.rs/pull/260","diff_url":"https://github.com/nickel-org/nickel.rs/pull/260.diff","patch_url":"https://github.com/nickel-org/nickel.rs/pull/260.patch"},"body":"The fixes for RFC rust-lang/rfcs#1214 uncovered some problems with how nickel was using lifetimes. These two patches correct the usage so that it will build after rust-lang/rust#27641 lands. I also attempted to move away from short names like `'a` and `'k` and instead give names to meaningful lifetimes within the processing of a request. I'm not sure that I found the best names, though. \r\n\r\nFrom what I can see, the role of the lifetime parameters is as follows:\r\n\r\n`'k` -- represents the internal hyper state, such as the network connection. I called this `'conn`.\r\n\r\n`'a` and `'b` -- are both varying lifetimes that generally represent \"the shortest lifetime of any borrowed data in the Request\". Generally this is the lifetime of the \"middleware\" portion of request processing, so I called it `'mw`.\r\n\r\nTo put this another way, I think that when we are processing any particular request, the stack frames are layered roughly like so, with the lifetimes `'mw` and `'conn` labeled:\r\n\r\n```\r\n<hyper>                +---------+ 'conn\r\n                                 |\r\n<nickle>               +--+ 'mw  |\r\n                          |      |\r\n<middleware>              |      |\r\n                          v      v\r\n```"},"comment":{"url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/comments/131210827","html_url":"https://github.com/nickel-org/nickel.rs/pull/260#issuecomment-131210827","issue_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/260","id":131210827,"user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T19:04:52Z","updated_at":"2015-08-14T19:04:52Z","body":"@Ryman \r\n\r\n> I guess we need to merge this in order to build on the next nightly? Or are the new rules going to be feature flagged? \r\n\r\nI did my best to ensure that the changes only receive warnings, but nickel was one of a handful projects that will actually get hard errors (because I couldn't disentangle the effects of the bug fixes from everything else).\r\n\r\n@cburgdorf \r\n\r\n> Minor nit, we require commits to follow this commit message convention. But it's fine, we can change the commit message on our end before merging.\r\n\r\nOK, happy to fix it up. Gimme a second."}}