{"action":"created","issue":{"url":"https://api.github.com/repos/sgrif/diesel/issues/35","labels_url":"https://api.github.com/repos/sgrif/diesel/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/sgrif/diesel/issues/35/comments","events_url":"https://api.github.com/repos/sgrif/diesel/issues/35/events","html_url":"https://github.com/sgrif/diesel/issues/35","id":119443747,"number":35,"title":"Queriable trait codegen breaks on explicit lifetimes","user":{"login":"mcasper","id":6878025,"avatar_url":"https://avatars.githubusercontent.com/u/6878025?v=3","gravatar_id":"","url":"https://api.github.com/users/mcasper","html_url":"https://github.com/mcasper","followers_url":"https://api.github.com/users/mcasper/followers","following_url":"https://api.github.com/users/mcasper/following{/other_user}","gists_url":"https://api.github.com/users/mcasper/gists{/gist_id}","starred_url":"https://api.github.com/users/mcasper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcasper/subscriptions","organizations_url":"https://api.github.com/users/mcasper/orgs","repos_url":"https://api.github.com/users/mcasper/repos","events_url":"https://api.github.com/users/mcasper/events{/privacy}","received_events_url":"https://api.github.com/users/mcasper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-30T08:44:01Z","updated_at":"2015-11-30T11:19:11Z","closed_at":null,"body":"Deriving `Queriable` for structs with explicit lifetimes blows up with the error message:\r\n```\r\n   Compiling diesel_test v0.1.0 (file:///Users/mattcasper/code/diesel_test)\r\nsrc/main.rs:28:18: 28:20 error: use of undeclared lifetime name `'a` [E0261]\r\nsrc/main.rs:28     first_name: &'a str,\r\n                                ^~\r\nsrc/main.rs:25:10: 25:19 note: in this expansion of #[derive_Queriable] (defined in src/main.rs)\r\nsrc/main.rs:28:18: 28:20 help: run `rustc --explain E0261` to see a detailed explanation\r\nsrc/main.rs:28:18: 28:20 error: use of undeclared lifetime name `'a` [E0261]\r\nsrc/main.rs:28     first_name: &'a str,\r\n                                ^~\r\nsrc/main.rs:25:10: 25:19 note: in this expansion of #[derive_Queriable] (defined in src/main.rs)\r\nsrc/main.rs:28:18: 28:20 help: run `rustc --explain E0261` to see a detailed explanation\r\nerror: aborting due to 2 previous errors\r\n```\r\nfor the struct\r\n```\r\n#[derive(Queriable)]\r\npub struct User<'a> {\r\n    id: i32,\r\n    first_name: &'a str,\r\n    last_name: String,\r\n    email: String\r\n}\r\n```\r\nAnd trying to implement the trait by hand got tricky, I got stuck on what `$row_type` evaluates to."},"comment":{"url":"https://api.github.com/repos/sgrif/diesel/issues/comments/160602703","html_url":"https://github.com/sgrif/diesel/issues/35#issuecomment-160602703","issue_url":"https://api.github.com/repos/sgrif/diesel/issues/35","id":160602703,"user":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T11:19:11Z","updated_at":"2015-11-30T11:19:11Z","body":"We should improve the error message here though"}}