{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/48191","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/48191/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/48191/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/48191/events","html_url":"https://github.com/rust-lang/rust/pull/48191","id":296849289,"number":48191,"title":"Add a generic `From<&Borrow>` impl for `Cow`","user":{"login":"burtonageo","id":1732920,"avatar_url":"https://avatars2.githubusercontent.com/u/1732920?v=4","gravatar_id":"","url":"https://api.github.com/users/burtonageo","html_url":"https://github.com/burtonageo","followers_url":"https://api.github.com/users/burtonageo/followers","following_url":"https://api.github.com/users/burtonageo/following{/other_user}","gists_url":"https://api.github.com/users/burtonageo/gists{/gist_id}","starred_url":"https://api.github.com/users/burtonageo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burtonageo/subscriptions","organizations_url":"https://api.github.com/users/burtonageo/orgs","repos_url":"https://api.github.com/users/burtonageo/repos","events_url":"https://api.github.com/users/burtonageo/events{/privacy}","received_events_url":"https://api.github.com/users/burtonageo/received_events","type":"User","site_admin":false},"labels":[{"id":583426710,"url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-review","name":"S-waiting-on-review","color":"d3dddd","default":false}],"state":"open","locked":false,"assignee":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"assignees":[{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2018-02-13T19:00:39Z","updated_at":"2018-02-17T15:54:00Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/48191","html_url":"https://github.com/rust-lang/rust/pull/48191","diff_url":"https://github.com/rust-lang/rust/pull/48191.diff","patch_url":"https://github.com/rust-lang/rust/pull/48191.patch"},"body":"This commit removes the ad-hoc impls of `From<&Borrow> for Cow`, and replaces them with a generic `From` impl across all `&Borrow<T>`. I am unsure of how the stability attributes should work, so I will need some guidance to get this in good shape to submit.\r\n\r\nThe practical effects of this commit are:\r\n- There are now `From<&Borrow>` impls derived for `Cow<CStr>` and `Cow<OsStr>`, as well as any other ecosystem types that can be borrowed (e.g. [ascii types](https://crates.io/crates/ascii))\r\n- `From<&Owned>` is now auto implemented. This fixes some issues with using `Into<Cow<T>>` in generic situations, as shown in [this playground](https://play.rust-lang.org/?gist=c208363beb1408c4b019f33429420665&version=stable).\r\n\r\nSome other issues:\r\n- I attempted to add an `impl<T: ToOwned> From<T::Owned> for Cow<T>`, however it conflicted with the reflexive `From` impl in core. Thus, those impls will still have to be implemented in an ad-hoc way until maybe specialization could solve it."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/366450205","html_url":"https://github.com/rust-lang/rust/pull/48191#issuecomment-366450205","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/48191","id":366450205,"user":{"login":"shepmaster","id":174509,"avatar_url":"https://avatars0.githubusercontent.com/u/174509?v=4","gravatar_id":"","url":"https://api.github.com/users/shepmaster","html_url":"https://github.com/shepmaster","followers_url":"https://api.github.com/users/shepmaster/followers","following_url":"https://api.github.com/users/shepmaster/following{/other_user}","gists_url":"https://api.github.com/users/shepmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/shepmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepmaster/subscriptions","organizations_url":"https://api.github.com/users/shepmaster/orgs","repos_url":"https://api.github.com/users/shepmaster/repos","events_url":"https://api.github.com/users/shepmaster/events{/privacy}","received_events_url":"https://api.github.com/users/shepmaster/received_events","type":"User","site_admin":false},"created_at":"2018-02-17T15:54:00Z","updated_at":"2018-02-17T15:54:00Z","author_association":"MEMBER","body":"Ping from triage, @alexcrichton — will you be able to give this a review sometime soon?"}}
{"actor":{"display_login":"shepmaster"}}