{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/37192","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/37192/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/37192/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/37192/events","html_url":"https://github.com/rust-lang/rust/pull/37192","id":183224116,"number":37192,"title":"Add `{into,from}_raw` to Rc and Arc","user":{"login":"cristicbz","id":801328,"avatar_url":"https://avatars.githubusercontent.com/u/801328?v=3","gravatar_id":"","url":"https://api.github.com/users/cristicbz","html_url":"https://github.com/cristicbz","followers_url":"https://api.github.com/users/cristicbz/followers","following_url":"https://api.github.com/users/cristicbz/following{/other_user}","gists_url":"https://api.github.com/users/cristicbz/gists{/gist_id}","starred_url":"https://api.github.com/users/cristicbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristicbz/subscriptions","organizations_url":"https://api.github.com/users/cristicbz/orgs","repos_url":"https://api.github.com/users/cristicbz/repos","events_url":"https://api.github.com/users/cristicbz/events{/privacy}","received_events_url":"https://api.github.com/users/cristicbz/received_events","type":"User","site_admin":false},"labels":[{"id":211668062,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-libs","name":"T-libs","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":{"login":"brson","id":147214,"avatar_url":"https://avatars.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false},"assignees":[{"login":"brson","id":147214,"avatar_url":"https://avatars.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":45,"created_at":"2016-10-15T18:13:03Z","updated_at":"2016-11-08T20:13:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/37192","html_url":"https://github.com/rust-lang/rust/pull/37192","diff_url":"https://github.com/rust-lang/rust/pull/37192.diff","patch_url":"https://github.com/rust-lang/rust/pull/37192.patch"},"body":"These methods convert to and from a `*const T` for `Rc` and `Arc` similar to the way they work on `Box`. The only slight complication is that `from_raw` needs to offset the pointer back to find the beginning of the `RcBox`/`ArcInner`.\r\n\r\nI felt this is a fairly small addition, filling in a gap (when compared to `Box`) so it wouldn't need an RFC. The motivation is primarily for FFI.\r\n\r\n(I'll create an issue and update a PR with the issue number if reviewers agree with the change in principle **Edit: done #37197**) \r\n\r\n~~Edit: This was initially `{into,from}_raw` but concerns were raised about the possible footgun if mixed with the methods of the same name of `Box`.~~\r\n\r\nEdit: This was went from `{into,from}_raw` to `{into,from}_inner_raw` then back to `{into,from}_raw` during review."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/259246473","html_url":"https://github.com/rust-lang/rust/pull/37192#issuecomment-259246473","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/37192","id":259246473,"user":{"login":"bors","id":3372342,"avatar_url":"https://avatars.githubusercontent.com/u/3372342?v=3","gravatar_id":"","url":"https://api.github.com/users/bors","html_url":"https://github.com/bors","followers_url":"https://api.github.com/users/bors/followers","following_url":"https://api.github.com/users/bors/following{/other_user}","gists_url":"https://api.github.com/users/bors/gists{/gist_id}","starred_url":"https://api.github.com/users/bors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bors/subscriptions","organizations_url":"https://api.github.com/users/bors/orgs","repos_url":"https://api.github.com/users/bors/repos","events_url":"https://api.github.com/users/bors/events{/privacy}","received_events_url":"https://api.github.com/users/bors/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T20:13:46Z","updated_at":"2016-11-08T20:13:46Z","body":":hourglass: Testing commit 651cf58 with merge 0491a23..."}}
{"actor":{"display_login":"bors"}}