{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/36470","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/36470/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/36470/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/36470/events","html_url":"https://github.com/rust-lang/rust/pull/36470","id":176819934,"number":36470,"title":"Clarify the workings of StringReader in the lexer","user":{"login":"nnethercote","id":1940286,"avatar_url":"https://avatars.githubusercontent.com/u/1940286?v=3","gravatar_id":"","url":"https://api.github.com/users/nnethercote","html_url":"https://github.com/nnethercote","followers_url":"https://api.github.com/users/nnethercote/followers","following_url":"https://api.github.com/users/nnethercote/following{/other_user}","gists_url":"https://api.github.com/users/nnethercote/gists{/gist_id}","starred_url":"https://api.github.com/users/nnethercote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nnethercote/subscriptions","organizations_url":"https://api.github.com/users/nnethercote/orgs","repos_url":"https://api.github.com/users/nnethercote/repos","events_url":"https://api.github.com/users/nnethercote/events{/privacy}","received_events_url":"https://api.github.com/users/nnethercote/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"eddyb","id":77424,"avatar_url":"https://avatars.githubusercontent.com/u/77424?v=3","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false},"assignees":[{"login":"eddyb","id":77424,"avatar_url":"https://avatars.githubusercontent.com/u/77424?v=3","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2016-09-14T05:41:19Z","updated_at":"2016-10-03T20:08:54Z","closed_at":"2016-10-03T20:08:54Z","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/36470","html_url":"https://github.com/rust-lang/rust/pull/36470","diff_url":"https://github.com/rust-lang/rust/pull/36470.diff","patch_url":"https://github.com/rust-lang/rust/pull/36470.patch"},"body":"In a lexer you want it to be extremely clear what the current character is, as well as those before and after it. The current code and comments in StringReader don't achieve this: `curr` refers to the current character, but so does `last_pos`; `pos` refers to the next character; and `col` refers to the current character but its comment says it refers to the next character.\r\n\r\nThis PR renames some of these fields and does some related clean-ups. This makes the lexer code easier to understand and marginally faster."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/251212077","html_url":"https://github.com/rust-lang/rust/pull/36470#issuecomment-251212077","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/36470","id":251212077,"user":{"login":"nnethercote","id":1940286,"avatar_url":"https://avatars.githubusercontent.com/u/1940286?v=3","gravatar_id":"","url":"https://api.github.com/users/nnethercote","html_url":"https://github.com/nnethercote","followers_url":"https://api.github.com/users/nnethercote/followers","following_url":"https://api.github.com/users/nnethercote/following{/other_user}","gists_url":"https://api.github.com/users/nnethercote/gists{/gist_id}","starred_url":"https://api.github.com/users/nnethercote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nnethercote/subscriptions","organizations_url":"https://api.github.com/users/nnethercote/orgs","repos_url":"https://api.github.com/users/nnethercote/repos","events_url":"https://api.github.com/users/nnethercote/events{/privacy}","received_events_url":"https://api.github.com/users/nnethercote/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T20:08:54Z","updated_at":"2016-10-03T20:08:54Z","body":"Oh... I pulled out two of these commits in #36921, and I want to redo the renaming in the way I mentioned above, and I want to do some similar renamings in the parser.\r\n\r\nSo: thank you for the review, @eddyb, but I'd like to hold off from landing these commits in their current form. (Well, they need a rebase, but I'm going to change them in a bigger way.) I will file a new PR for that to make things clearer. Apologies for the lack of clarity."}}
{"actor":{"display_login":"nnethercote"}}