{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/18741","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/18741/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/18741/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/18741/events","html_url":"https://github.com/rust-lang/rust/issues/18741","id":48113604,"number":18741,"title":"Cleanup and consolidate operator/method dispatch code","user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-typesystem","name":"A-typesystem","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/E-mentor","name":"E-mentor","color":"02E10C"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-cleanup","name":"I-cleanup","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-11-07T18:17:48Z","updated_at":"2016-01-04T20:33:15Z","closed_at":null,"body":"Once upon a time, both operator dispatch and method lookup went through the same tangled, twisty paths. It was a mess. But lo, they were severed and made two. Each could follow its own path. Overall, this is progress. But there is still room for improvement:\r\n\r\n1. The second half of \"operator dispatch\" is basically the same as `confirm::confirm`, but with some slight differences.\r\n2. The autoderef loop for `[]` is basically the same as `probe`, but with some slight differences (e.g., at each step it consists builtin `[]` as well).\r\n3. The `probe` loop, which uses `check::autoderef`, isn't able to be part of an inference transaction between `check::autoderef` uses operator dispatch which adds things into the main fulfillment context, thus leaking inference types etc outside the transaction.\r\n\r\nIt feels like things could still be cleaned up a bit further, allowing for more code reuse and happiness all around.\r\n\r\nSome FIXMEs are scattered about at relevant points of the code."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/168797336","html_url":"https://github.com/rust-lang/rust/issues/18741#issuecomment-168797336","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/18741","id":168797336,"user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T20:33:15Z","updated_at":"2016-01-04T20:33:15Z","body":"On Thu, Dec 31, 2015 at 10:26:12AM -0800, Steve Klabnik wrote:\n> @nikomatsakis is this ticket still valid?\n\nyes\n"}}