{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/883","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/883/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/883/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/883/events","html_url":"https://github.com/rust-lang/rfcs/pull/883","id":57993242,"number":883,"title":"Make function pointer types look like borrowed pointer types for forwards compatability","user":{"login":"Ericson2314","id":1055245,"avatar_url":"https://avatars.githubusercontent.com/u/1055245?v=3","gravatar_id":"","url":"https://api.github.com/users/Ericson2314","html_url":"https://github.com/Ericson2314","followers_url":"https://api.github.com/users/Ericson2314/followers","following_url":"https://api.github.com/users/Ericson2314/following{/other_user}","gists_url":"https://api.github.com/users/Ericson2314/gists{/gist_id}","starred_url":"https://api.github.com/users/Ericson2314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ericson2314/subscriptions","organizations_url":"https://api.github.com/users/Ericson2314/orgs","repos_url":"https://api.github.com/users/Ericson2314/repos","events_url":"https://api.github.com/users/Ericson2314/events{/privacy}","received_events_url":"https://api.github.com/users/Ericson2314/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"milestone":null,"comments":62,"created_at":"2015-02-17T22:33:56Z","updated_at":"2015-03-11T05:36:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/883","html_url":"https://github.com/rust-lang/rfcs/pull/883","diff_url":"https://github.com/rust-lang/rfcs/pull/883.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/883.patch"},"body":"[Rendered](https://github.com/Ericson2314/rfcs/blob/fun-vs-fun-ptr/text/0000-fun-vs-fun-ptr.md)"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/78207902","html_url":"https://github.com/rust-lang/rfcs/pull/883#issuecomment-78207902","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/883","id":78207902,"user":{"login":"Ericson2314","id":1055245,"avatar_url":"https://avatars.githubusercontent.com/u/1055245?v=3","gravatar_id":"","url":"https://api.github.com/users/Ericson2314","html_url":"https://github.com/Ericson2314","followers_url":"https://api.github.com/users/Ericson2314/followers","following_url":"https://api.github.com/users/Ericson2314/following{/other_user}","gists_url":"https://api.github.com/users/Ericson2314/gists{/gist_id}","starred_url":"https://api.github.com/users/Ericson2314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ericson2314/subscriptions","organizations_url":"https://api.github.com/users/Ericson2314/orgs","repos_url":"https://api.github.com/users/Ericson2314/repos","events_url":"https://api.github.com/users/Ericson2314/events{/privacy}","received_events_url":"https://api.github.com/users/Ericson2314/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T05:36:02Z","updated_at":"2015-03-11T05:36:02Z","body":"@CloudiDust I think I see what you mean. While impls on the unsized functions are better for trait objects, impls on the pointers are better for calling polymorphic functions.\r\n\r\nFrankly though, I see the problem not specific to the closure traits, but more broadly part of a trade off between supporting in polymorphic code non-Copy types (or values that could be coppied but should be mutated in place) and cutting down on extraneous indirection. The controversy of whether iterators should be Copy, and the ByRef adapter iterator I'd wager stems in part from this.\r\n\r\nAn associated type defined to a borrowed pointer for non-copy types and a the type itself non copy ones would help in many places in Rust. The counter-argument is optimization should do most of that work, and it would make a whole lot of a code much less readable. And of course, negative bounds are needed to implement this.\r\n\r\nProbably the best lower-impact solution is to make some blanket impls. This would also make \"reusing\" sugar-made closures more ergonomic, to give an example of a different benefit."}}