{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/2529","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2529/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2529/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2529/events","html_url":"https://github.com/rust-lang/rfcs/pull/2529","id":353937587,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwODU2MDI4","number":2529,"title":"RFC: Hidden trait implementations","user":{"login":"Centril","id":855702,"node_id":"MDQ6VXNlcjg1NTcwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/855702?v=4","gravatar_id":"","url":"https://api.github.com/users/Centril","html_url":"https://github.com/Centril","followers_url":"https://api.github.com/users/Centril/followers","following_url":"https://api.github.com/users/Centril/following{/other_user}","gists_url":"https://api.github.com/users/Centril/gists{/gist_id}","starred_url":"https://api.github.com/users/Centril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Centril/subscriptions","organizations_url":"https://api.github.com/users/Centril/orgs","repos_url":"https://api.github.com/users/Centril/repos","events_url":"https://api.github.com/users/Centril/events{/privacy}","received_events_url":"https://api.github.com/users/Centril/received_events","type":"User","site_admin":false},"labels":[{"id":211667886,"node_id":"MDU6TGFiZWwyMTE2Njc4ODY=","url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-lang","name":"T-lang","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":{"login":"Centril","id":855702,"node_id":"MDQ6VXNlcjg1NTcwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/855702?v=4","gravatar_id":"","url":"https://api.github.com/users/Centril","html_url":"https://github.com/Centril","followers_url":"https://api.github.com/users/Centril/followers","following_url":"https://api.github.com/users/Centril/following{/other_user}","gists_url":"https://api.github.com/users/Centril/gists{/gist_id}","starred_url":"https://api.github.com/users/Centril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Centril/subscriptions","organizations_url":"https://api.github.com/users/Centril/orgs","repos_url":"https://api.github.com/users/Centril/repos","events_url":"https://api.github.com/users/Centril/events{/privacy}","received_events_url":"https://api.github.com/users/Centril/received_events","type":"User","site_admin":false},"assignees":[{"login":"Centril","id":855702,"node_id":"MDQ6VXNlcjg1NTcwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/855702?v=4","gravatar_id":"","url":"https://api.github.com/users/Centril","html_url":"https://github.com/Centril","followers_url":"https://api.github.com/users/Centril/followers","following_url":"https://api.github.com/users/Centril/following{/other_user}","gists_url":"https://api.github.com/users/Centril/gists{/gist_id}","starred_url":"https://api.github.com/users/Centril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Centril/subscriptions","organizations_url":"https://api.github.com/users/Centril/orgs","repos_url":"https://api.github.com/users/Centril/repos","events_url":"https://api.github.com/users/Centril/events{/privacy}","received_events_url":"https://api.github.com/users/Centril/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-08-24T21:44:20Z","updated_at":"2018-08-24T23:49:08Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2529","html_url":"https://github.com/rust-lang/rfcs/pull/2529","diff_url":"https://github.com/rust-lang/rfcs/pull/2529.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/2529.patch"},"body":"### [🖼️ Rendered](https://github.com/Centril/rfcs/blob/rfc/hidden-impls/text/0000-hidden-impls.md)\r\n\r\n### 📝 Summary\r\n\r\nAllow a visibility modifier on a `trait` implementation such that:\r\n\r\n+ it is public wrt. coherence and overlap (this property is meant to preserve coherence).\r\n+ it is not usable in contexts where it is *hidden* (not visible)\r\n\r\nAn example:\r\n\r\n```rust\r\n#[derive(Clone)]\r\nstruct Foo(..);\r\n\r\ncrate impl Copy for Foo {} // Can only be used in the current crate!\r\n```\r\n\r\n### 💖 Thanks\r\n\r\nTo @aturon, @Mark-Simulacrum, and @kennytm for reviewing the draft version of this RFC."},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/415910215","html_url":"https://github.com/rust-lang/rfcs/pull/2529#issuecomment-415910215","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2529","id":415910215,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTkxMDIxNQ==","user":{"login":"scottmcm","id":18526288,"node_id":"MDQ6VXNlcjE4NTI2Mjg4","avatar_url":"https://avatars2.githubusercontent.com/u/18526288?v=4","gravatar_id":"","url":"https://api.github.com/users/scottmcm","html_url":"https://github.com/scottmcm","followers_url":"https://api.github.com/users/scottmcm/followers","following_url":"https://api.github.com/users/scottmcm/following{/other_user}","gists_url":"https://api.github.com/users/scottmcm/gists{/gist_id}","starred_url":"https://api.github.com/users/scottmcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottmcm/subscriptions","organizations_url":"https://api.github.com/users/scottmcm/orgs","repos_url":"https://api.github.com/users/scottmcm/repos","events_url":"https://api.github.com/users/scottmcm/events{/privacy}","received_events_url":"https://api.github.com/users/scottmcm/received_events","type":"User","site_admin":false},"created_at":"2018-08-24T23:49:08Z","updated_at":"2018-08-24T23:49:08Z","author_association":"MEMBER","body":"How does this interact with blanket impls?  Like suppose it were `crate impl<T> From<T> for T { ... }`.  It feels really weird that you end up violating overlap for something you can't even use, and far more than it does for \"no, you can't implement that because it's for someone else's type\"."}}
{"actor":{"display_login":"scottmcm"}}