{"action":"opened","issue":{"url":"https://api.github.com/repos/SSheldon/rust-objc/issues/12","labels_url":"https://api.github.com/repos/SSheldon/rust-objc/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/SSheldon/rust-objc/issues/12/comments","events_url":"https://api.github.com/repos/SSheldon/rust-objc/issues/12/events","html_url":"https://github.com/SSheldon/rust-objc/issues/12","id":57753139,"number":12,"title":"Creating a MethodDecl isn't ergonomic","user":{"login":"SSheldon","id":478311,"avatar_url":"https://avatars.githubusercontent.com/u/478311?v=3","gravatar_id":"","url":"https://api.github.com/users/SSheldon","html_url":"https://github.com/SSheldon","followers_url":"https://api.github.com/users/SSheldon/followers","following_url":"https://api.github.com/users/SSheldon/following{/other_user}","gists_url":"https://api.github.com/users/SSheldon/gists{/gist_id}","starred_url":"https://api.github.com/users/SSheldon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SSheldon/subscriptions","organizations_url":"https://api.github.com/users/SSheldon/orgs","repos_url":"https://api.github.com/users/SSheldon/repos","events_url":"https://api.github.com/users/SSheldon/events{/privacy}","received_events_url":"https://api.github.com/users/SSheldon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-16T00:07:40Z","updated_at":"2015-02-16T00:07:40Z","closed_at":null,"body":"Creating a `MethodDecl` isn't ergonomic because you need to cast the function to a function pointer, like so:\r\n``` rust\r\nMethodDecl::new(sel!(setFoo:), my_obj_set_foo as extern fn(&mut Object, Sel, u32)\r\n```\r\n\r\nThis is a bummer because you need to repeat the types that you've already specified.\r\n\r\nThis wasn't always the case for Rust, but this behavior changed in rust-lang/rust#19891. rust-lang/rust#21086 was opened about this, but was closed as expected behavior."}}