{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/48361","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/48361/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/48361/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/48361/events","html_url":"https://github.com/rust-lang/rust/pull/48361","id":298410012,"number":48361,"title":"More precise suggestion for non_upper_case_globals","user":{"login":"phansch","id":2042399,"avatar_url":"https://avatars3.githubusercontent.com/u/2042399?v=4","gravatar_id":"","url":"https://api.github.com/users/phansch","html_url":"https://github.com/phansch","followers_url":"https://api.github.com/users/phansch/followers","following_url":"https://api.github.com/users/phansch/following{/other_user}","gists_url":"https://api.github.com/users/phansch/gists{/gist_id}","starred_url":"https://api.github.com/users/phansch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phansch/subscriptions","organizations_url":"https://api.github.com/users/phansch/orgs","repos_url":"https://api.github.com/users/phansch/repos","events_url":"https://api.github.com/users/phansch/events{/privacy}","received_events_url":"https://api.github.com/users/phansch/received_events","type":"User","site_admin":false},"labels":[{"id":583436937,"url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-author","name":"S-waiting-on-author","color":"d3dddd","default":false}],"state":"open","locked":false,"assignee":{"login":"Manishearth","id":1617736,"avatar_url":"https://avatars2.githubusercontent.com/u/1617736?v=4","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false},"assignees":[{"login":"Manishearth","id":1617736,"avatar_url":"https://avatars2.githubusercontent.com/u/1617736?v=4","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2018-02-19T21:49:43Z","updated_at":"2018-03-06T20:35:46Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/48361","html_url":"https://github.com/rust-lang/rust/pull/48361","diff_url":"https://github.com/rust-lang/rust/pull/48361.diff","patch_url":"https://github.com/rust-lang/rust/pull/48361.patch"},"body":"This makes the suggestion span for the `non_upper_case_globals` lint a bit\r\nmore precise. Before it was highlighting the whole line. With this change\r\nit will highlight only the variable name itself.\r\n\r\nCurrently the way the span is calculated doesn't look very nice.\r\nEspecially the `name.as_str().chars().as_str()` which I used to turn an\r\n`InternedString` into a `&str`. Unfortunately I couldn't find a better way.\r\n\r\nr? @Manishearth \r\n\r\nFixes #48103 "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/370919092","html_url":"https://github.com/rust-lang/rust/pull/48361#issuecomment-370919092","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/48361","id":370919092,"user":{"login":"nrc","id":762626,"avatar_url":"https://avatars0.githubusercontent.com/u/762626?v=4","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":"2018-03-06T20:35:46Z","updated_at":"2018-03-06T20:35:46Z","author_association":"CONTRIBUTOR","body":"> Hm, it seems like we can't get the span of the name directly. \r\n\r\nCan you change the AST to include the span of the ident (there used to be SpannedIdent, but I think it might have changed to something else).\r\n\r\n> In general manually building spans is a bad idea.\r\n\r\nThis 100 times! I did it a lot in save-analysis and it has been a source of lots of pain."}}
{"actor":{"display_login":"nrc"}}