{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/50513","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/50513/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/50513/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/50513/events","html_url":"https://github.com/rust-lang/rust/issues/50513","id":320890668,"node_id":"MDU6SXNzdWUzMjA4OTA2Njg=","number":50513,"title":"Support T: ?Sized in Weak::new()","user":{"login":"dtolnay","id":1940490,"node_id":"MDQ6VXNlcjE5NDA0OTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1940490?v=4","gravatar_id":"","url":"https://api.github.com/users/dtolnay","html_url":"https://github.com/dtolnay","followers_url":"https://api.github.com/users/dtolnay/followers","following_url":"https://api.github.com/users/dtolnay/following{/other_user}","gists_url":"https://api.github.com/users/dtolnay/gists{/gist_id}","starred_url":"https://api.github.com/users/dtolnay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtolnay/subscriptions","organizations_url":"https://api.github.com/users/dtolnay/orgs","repos_url":"https://api.github.com/users/dtolnay/repos","events_url":"https://api.github.com/users/dtolnay/events{/privacy}","received_events_url":"https://api.github.com/users/dtolnay/received_events","type":"User","site_admin":false},"labels":[{"id":211668062,"node_id":"MDU6TGFiZWwyMTE2NjgwNjI=","url":"https://api.github.com/repos/rust-lang/rust/labels/T-libs","name":"T-libs","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-07T17:38:46Z","updated_at":"2018-06-27T17:10:09Z","closed_at":null,"author_association":"MEMBER","body":"The [`std::rc::Weak::new`](https://doc.rust-lang.org/std/rc/struct.Weak.html#method.new) and [`std::sync::Weak::new`](https://doc.rust-lang.org/std/sync/struct.Weak.html#method.new) constructors added in #30467 should be able to work with `T: ?Sized`.\r\n\r\n```rust\r\nlet _: Weak<str> = Weak::new();\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/400760288","html_url":"https://github.com/rust-lang/rust/issues/50513#issuecomment-400760288","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/50513","id":400760288,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDc2MDI4OA==","user":{"login":"rkruppe","id":2311707,"node_id":"MDQ6VXNlcjIzMTE3MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/2311707?v=4","gravatar_id":"","url":"https://api.github.com/users/rkruppe","html_url":"https://github.com/rkruppe","followers_url":"https://api.github.com/users/rkruppe/followers","following_url":"https://api.github.com/users/rkruppe/following{/other_user}","gists_url":"https://api.github.com/users/rkruppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rkruppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkruppe/subscriptions","organizations_url":"https://api.github.com/users/rkruppe/orgs","repos_url":"https://api.github.com/users/rkruppe/repos","events_url":"https://api.github.com/users/rkruppe/events{/privacy}","received_events_url":"https://api.github.com/users/rkruppe/received_events","type":"User","site_admin":false},"created_at":"2018-06-27T17:10:09Z","updated_at":"2018-06-27T17:10:09Z","author_association":"CONTRIBUTOR","body":"Weak refers to an `RcBox` though, and so `Weak::new` allocates a dummy one to refer to it. I believe this could be changed to make it store an `Option<NonNull<RcBox<T>>>`, but then `Weak` itself would no longer be non-null (i.e., `Option<Weak<T>>` wouldn't be pointer sized any more) and we'd need branches in any method that accesses the RcBox."}}
{"actor":{"display_login":"rkruppe"}}