{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/24789","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/24789/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/24789/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/24789/events","html_url":"https://github.com/rust-lang/rust/issues/24789","id":70806975,"number":24789,"title":"`std::rc::try_unwrap()` should only consider the strong refcount","user":{"login":"cybergeek94","id":3198595,"avatar_url":"https://avatars.githubusercontent.com/u/3198595?v=3","gravatar_id":"","url":"https://api.github.com/users/cybergeek94","html_url":"https://github.com/cybergeek94","followers_url":"https://api.github.com/users/cybergeek94/followers","following_url":"https://api.github.com/users/cybergeek94/following{/other_user}","gists_url":"https://api.github.com/users/cybergeek94/gists{/gist_id}","starred_url":"https://api.github.com/users/cybergeek94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cybergeek94/subscriptions","organizations_url":"https://api.github.com/users/cybergeek94/orgs","repos_url":"https://api.github.com/users/cybergeek94/repos","events_url":"https://api.github.com/users/cybergeek94/events{/privacy}","received_events_url":"https://api.github.com/users/cybergeek94/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-libs","name":"A-libs","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-24T22:12:44Z","updated_at":"2015-08-22T12:34:55Z","closed_at":null,"body":"From [this reddit thread][1].\r\n\r\n[`std::rc::try_unwrap()`][2] returns `Err` if the `Rc` is not unique, which includes weak references. This fails intuition as the logic is the same as when the last `Rc` is dropped, which only considers strong references when deciding whether to drop the contained value, except it keeps the contained value from being destroyed. I fail to see how it is unsafe to unwrap when only weak references remain.\r\n\r\n[1]: http://www.reddit.com/r/rust/comments/33oxls/move_value_out_of_rc_with_weak_refernces/\r\n[2]: http://doc.rust-lang.org/std/rc/fn.try_unwrap.html"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/133689220","html_url":"https://github.com/rust-lang/rust/issues/24789#issuecomment-133689220","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/24789","id":133689220,"user":{"login":"SimonSapin","id":291359,"avatar_url":"https://avatars.githubusercontent.com/u/291359?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T12:34:55Z","updated_at":"2015-08-22T12:34:55Z","body":"This is fixed in #27837 and can be closed."}}