{"action":"opened","number":50173,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/50173","id":183334962,"html_url":"https://github.com/rust-lang/rust/pull/50173","diff_url":"https://github.com/rust-lang/rust/pull/50173.diff","patch_url":"https://github.com/rust-lang/rust/pull/50173.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/50173","number":50173,"state":"open","locked":false,"title":"WIP: Implement object-safety and dynamic dispatch for arbitrary_self_types","user":{"login":"mikeyhew","id":6751033,"avatar_url":"https://avatars2.githubusercontent.com/u/6751033?v=4","gravatar_id":"","url":"https://api.github.com/users/mikeyhew","html_url":"https://github.com/mikeyhew","followers_url":"https://api.github.com/users/mikeyhew/followers","following_url":"https://api.github.com/users/mikeyhew/following{/other_user}","gists_url":"https://api.github.com/users/mikeyhew/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeyhew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeyhew/subscriptions","organizations_url":"https://api.github.com/users/mikeyhew/orgs","repos_url":"https://api.github.com/users/mikeyhew/repos","events_url":"https://api.github.com/users/mikeyhew/events{/privacy}","received_events_url":"https://api.github.com/users/mikeyhew/received_events","type":"User","site_admin":false},"body":"r? @nikomatsakis \r\ncc @withoutboats @arielb1 @eddyb \r\n\r\nThis is a work-in-progress PR that I am opening so that I can ask people questions as I implement it. Currently, I've added a single run-pass test that shows the ultimate goal of this PR in its most general form.\r\n\r\nCustom method receivers, that is, anything except for `self`, `&self, `&mut self` and `self: Box<Self>`, are currently considered non-object-safe. This PR will relax that restriction, and will allow any receiver that can be coerced from its fat version (containing the vtable) to its thin version (without a vtable). To check this, we require the following trait obligation to be satisfied:\r\n\r\n```\r\nforall<U> {\r\n    if (Self: Unsize<U>) {\r\n        Receiver: CoerceUnsized<Receiver<Self=U>>\r\n    }\r\n}\r\n```\r\n\r\nwhere `Receiver` is the type of the method's `self` argument, and the `Receiver<Self=U>` syntax means `Receiver` but with all instances of `Self` replaced with `U`.","created_at":"2018-04-23T06:16:15Z","updated_at":"2018-04-23T06:16:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/50173/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/50173/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/50173/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/79052149343d966a0a66dadfba303a66a3825438","head":{"label":"mikeyhew:arbitrary-self-types-object-safety","ref":"arbitrary-self-types-object-safety","sha":"79052149343d966a0a66dadfba303a66a3825438","user":{"login":"mikeyhew","id":6751033,"avatar_url":"https://avatars2.githubusercontent.com/u/6751033?v=4","gravatar_id":"","url":"https://api.github.com/users/mikeyhew","html_url":"https://github.com/mikeyhew","followers_url":"https://api.github.com/users/mikeyhew/followers","following_url":"https://api.github.com/users/mikeyhew/following{/other_user}","gists_url":"https://api.github.com/users/mikeyhew/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeyhew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeyhew/subscriptions","organizations_url":"https://api.github.com/users/mikeyhew/orgs","repos_url":"https://api.github.com/users/mikeyhew/repos","events_url":"https://api.github.com/users/mikeyhew/events{/privacy}","received_events_url":"https://api.github.com/users/mikeyhew/received_events","type":"User","site_admin":false},"repo":{"id":90232502,"name":"rust","full_name":"mikeyhew/rust","owner":{"login":"mikeyhew","id":6751033,"avatar_url":"https://avatars2.githubusercontent.com/u/6751033?v=4","gravatar_id":"","url":"https://api.github.com/users/mikeyhew","html_url":"https://github.com/mikeyhew","followers_url":"https://api.github.com/users/mikeyhew/followers","following_url":"https://api.github.com/users/mikeyhew/following{/other_user}","gists_url":"https://api.github.com/users/mikeyhew/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeyhew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeyhew/subscriptions","organizations_url":"https://api.github.com/users/mikeyhew/orgs","repos_url":"https://api.github.com/users/mikeyhew/repos","events_url":"https://api.github.com/users/mikeyhew/events{/privacy}","received_events_url":"https://api.github.com/users/mikeyhew/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikeyhew/rust","description":"A safe, concurrent, practical language.","fork":true,"url":"https://api.github.com/repos/mikeyhew/rust","forks_url":"https://api.github.com/repos/mikeyhew/rust/forks","keys_url":"https://api.github.com/repos/mikeyhew/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikeyhew/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikeyhew/rust/teams","hooks_url":"https://api.github.com/repos/mikeyhew/rust/hooks","issue_events_url":"https://api.github.com/repos/mikeyhew/rust/issues/events{/number}","events_url":"https://api.github.com/repos/mikeyhew/rust/events","assignees_url":"https://api.github.com/repos/mikeyhew/rust/assignees{/user}","branches_url":"https://api.github.com/repos/mikeyhew/rust/branches{/branch}","tags_url":"https://api.github.com/repos/mikeyhew/rust/tags","blobs_url":"https://api.github.com/repos/mikeyhew/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikeyhew/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikeyhew/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikeyhew/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikeyhew/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/mikeyhew/rust/languages","stargazers_url":"https://api.github.com/repos/mikeyhew/rust/stargazers","contributors_url":"https://api.github.com/repos/mikeyhew/rust/contributors","subscribers_url":"https://api.github.com/repos/mikeyhew/rust/subscribers","subscription_url":"https://api.github.com/repos/mikeyhew/rust/subscription","commits_url":"https://api.github.com/repos/mikeyhew/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikeyhew/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikeyhew/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikeyhew/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikeyhew/rust/contents/{+path}","compare_url":"https://api.github.com/repos/mikeyhew/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikeyhew/rust/merges","archive_url":"https://api.github.com/repos/mikeyhew/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikeyhew/rust/downloads","issues_url":"https://api.github.com/repos/mikeyhew/rust/issues{/number}","pulls_url":"https://api.github.com/repos/mikeyhew/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/mikeyhew/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/mikeyhew/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikeyhew/rust/labels{/name}","releases_url":"https://api.github.com/repos/mikeyhew/rust/releases{/id}","deployments_url":"https://api.github.com/repos/mikeyhew/rust/deployments","created_at":"2017-05-04T07:08:53Z","updated_at":"2017-05-04T07:09:15Z","pushed_at":"2018-04-23T05:55:22Z","git_url":"git://github.com/mikeyhew/rust.git","ssh_url":"git@github.com:mikeyhew/rust.git","clone_url":"https://github.com/mikeyhew/rust.git","svn_url":"https://github.com/mikeyhew/rust","homepage":"https://www.rust-lang.org","size":348055,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"2c57826b9254288f40909615ced85a171f96e95c","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars1.githubusercontent.com/u/5430905?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars1.githubusercontent.com/u/5430905?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"A safe, concurrent, practical language.","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang/rust/deployments","created_at":"2010-06-16T20:39:03Z","updated_at":"2018-04-23T05:36:28Z","pushed_at":"2018-04-23T04:23:49Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"https://www.rust-lang.org","size":368889,"stargazers_count":27806,"watchers_count":27806,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4865,"mirror_url":null,"archived":false,"open_issues_count":3712,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4865,"open_issues":3712,"watchers":27806,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50173"},"html":{"href":"https://github.com/rust-lang/rust/pull/50173"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/50173"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/50173/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50173/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50173/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/79052149343d966a0a66dadfba303a66a3825438"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":75,"deletions":14,"changed_files":1}}
{"actor":{"display_login":"mikeyhew"}}