{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/33644","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/33644/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/33644/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/33644/events","html_url":"https://github.com/rust-lang/rust/pull/33644","id":154881941,"number":33644,"title":"Remove ExplicitSelf from AST","user":{"login":"petrochenkov","id":5751617,"avatar_url":"https://avatars.githubusercontent.com/u/5751617?v=3","gravatar_id":"","url":"https://api.github.com/users/petrochenkov","html_url":"https://github.com/petrochenkov","followers_url":"https://api.github.com/users/petrochenkov/followers","following_url":"https://api.github.com/users/petrochenkov/following{/other_user}","gists_url":"https://api.github.com/users/petrochenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/petrochenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrochenkov/subscriptions","organizations_url":"https://api.github.com/users/petrochenkov/orgs","repos_url":"https://api.github.com/users/petrochenkov/repos","events_url":"https://api.github.com/users/petrochenkov/events{/privacy}","received_events_url":"https://api.github.com/users/petrochenkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"nrc","id":762626,"avatar_url":"https://avatars.githubusercontent.com/u/762626?v=3","gravatar_id":"","url":"https://api.github.com/users/nrc","html_url":"https://github.com/nrc","followers_url":"https://api.github.com/users/nrc/followers","following_url":"https://api.github.com/users/nrc/following{/other_user}","gists_url":"https://api.github.com/users/nrc/gists{/gist_id}","starred_url":"https://api.github.com/users/nrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrc/subscriptions","organizations_url":"https://api.github.com/users/nrc/orgs","repos_url":"https://api.github.com/users/nrc/repos","events_url":"https://api.github.com/users/nrc/events{/privacy}","received_events_url":"https://api.github.com/users/nrc/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-05-15T00:00:15Z","updated_at":"2016-05-15T22:33:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/33644","html_url":"https://github.com/rust-lang/rust/pull/33644","diff_url":"https://github.com/rust-lang/rust/pull/33644.diff","patch_url":"https://github.com/rust-lang/rust/pull/33644.patch"},"body":"The AST part of https://github.com/rust-lang/rust/pull/33505.\r\nhttps://github.com/rust-lang/rust/pull/33505 isn't landed yet, so this PR is based on top of it.\r\n\r\nr? @nrc \r\n\r\nplugin-[breaking-change] cc #31645 @Manishearth"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/219315079","html_url":"https://github.com/rust-lang/rust/pull/33644#issuecomment-219315079","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/33644","id":219315079,"user":{"login":"nrc","id":762626,"avatar_url":"https://avatars.githubusercontent.com/u/762626?v=3","gravatar_id":"","url":"https://api.github.com/users/nrc","html_url":"https://github.com/nrc","followers_url":"https://api.github.com/users/nrc/followers","following_url":"https://api.github.com/users/nrc/following{/other_user}","gists_url":"https://api.github.com/users/nrc/gists{/gist_id}","starred_url":"https://api.github.com/users/nrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrc/subscriptions","organizations_url":"https://api.github.com/users/nrc/orgs","repos_url":"https://api.github.com/users/nrc/repos","events_url":"https://api.github.com/users/nrc/events{/privacy}","received_events_url":"https://api.github.com/users/nrc/received_events","type":"User","site_admin":false},"created_at":"2016-05-15T22:33:28Z","updated_at":"2016-05-15T22:33:28Z","body":"I'd like to explore the design space a bit here. My motivation is that the AST should be as close as possible to the source text. It is meant to be useful as a representation of the source, rather than a more abstract representation of the program (which is the job of the HIR). As such, I think it is less important to make the AST as small as possible at the expense of losing information about the original program. The fact that we need the bool hack in `MethodSig` in order to accomodate `self` as a regular argument suggests to me that the homogeneous argument approach is not the right one here.\r\n\r\nWhat is the motivation for this? AIUI the major problem is that explicit self is represented both by an argument and by an `ExplicitSelf`. Are there other goals here too?\r\n\r\nThe obvious fix seems to be remove it from the argument list (clearly it ought to be in the argument list in the HIR, but I don't see a need in the AST). Alternatively, we could make an `Argument` enum with an explicit self variant and a 'regular' argument variant and make the `inputs` of `FnDecl` an array of that enum. The downside of this is that we don't limit `self` to methods or to the first argument position."}}