{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rustfmt/pulls/comments/254596143","pull_request_review_id":200979393,"id":254596143,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1NDU5NjE0Mw==","diff_hunk":"@@ -34,6 +34,18 @@ pub fn get_attrs_from_stmt(stmt: &ast::Stmt) -> &[ast::Attribute] {\n     }\n }\n \n+pub fn get_span_without_attrs(stmt: &ast::Stmt) -> Span {\n+    match stmt.node {","path":"src/attr.rs","position":5,"original_position":5,"commit_id":"109394536dd05f51559a9b70a2efa018166c5061","original_commit_id":"2502939b608b2cb33e9d916d1f3d3b9afeac7e0c","user":{"login":"fyrchik","id":22011053,"node_id":"MDQ6VXNlcjIyMDExMDUz","avatar_url":"https://avatars0.githubusercontent.com/u/22011053?v=4","gravatar_id":"","url":"https://api.github.com/users/fyrchik","html_url":"https://github.com/fyrchik","followers_url":"https://api.github.com/users/fyrchik/followers","following_url":"https://api.github.com/users/fyrchik/following{/other_user}","gists_url":"https://api.github.com/users/fyrchik/gists{/gist_id}","starred_url":"https://api.github.com/users/fyrchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyrchik/subscriptions","organizations_url":"https://api.github.com/users/fyrchik/orgs","repos_url":"https://api.github.com/users/fyrchik/repos","events_url":"https://api.github.com/users/fyrchik/events{/privacy}","received_events_url":"https://api.github.com/users/fyrchik/received_events","type":"User","site_admin":false},"body":"Done!","created_at":"2019-02-07T09:13:10Z","updated_at":"2019-02-07T09:13:10Z","html_url":"https://github.com/rust-lang/rustfmt/pull/3322#discussion_r254596143","pull_request_url":"https://api.github.com/repos/rust-lang/rustfmt/pulls/3322","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rustfmt/pulls/comments/254596143"},"html":{"href":"https://github.com/rust-lang/rustfmt/pull/3322#discussion_r254596143"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rustfmt/pulls/3322"}},"in_reply_to_id":254581719},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rustfmt/pulls/3322","id":250653078,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUwNjUzMDc4","html_url":"https://github.com/rust-lang/rustfmt/pull/3322","diff_url":"https://github.com/rust-lang/rustfmt/pull/3322.diff","patch_url":"https://github.com/rust-lang/rustfmt/pull/3322.patch","issue_url":"https://api.github.com/repos/rust-lang/rustfmt/issues/3322","number":3322,"state":"open","locked":false,"title":"calculate statement first line properly","user":{"login":"fyrchik","id":22011053,"node_id":"MDQ6VXNlcjIyMDExMDUz","avatar_url":"https://avatars0.githubusercontent.com/u/22011053?v=4","gravatar_id":"","url":"https://api.github.com/users/fyrchik","html_url":"https://github.com/fyrchik","followers_url":"https://api.github.com/users/fyrchik/followers","following_url":"https://api.github.com/users/fyrchik/following{/other_user}","gists_url":"https://api.github.com/users/fyrchik/gists{/gist_id}","starred_url":"https://api.github.com/users/fyrchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyrchik/subscriptions","organizations_url":"https://api.github.com/users/fyrchik/orgs","repos_url":"https://api.github.com/users/fyrchik/repos","events_url":"https://api.github.com/users/fyrchik/events{/privacy}","received_events_url":"https://api.github.com/users/fyrchik/received_events","type":"User","site_admin":false},"body":"Hello! This fixes issue #3304 \r\nWe need to calculate `skipped_range` based on both first line after last attribute and first line of statement (in case they are both on one line).\r\nLet me know what do you think.\r\n\r\nEDIT: to my current understanding, span of `ast::Item` already excludes attributes, so in that case 2nd and 3rd arguments are the same.","created_at":"2019-02-06T07:09:59Z","updated_at":"2019-02-07T09:13:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e135838e92d47469750a4f06488207b5cbcea0a8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rustfmt/pulls/3322/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rustfmt/pulls/3322/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rustfmt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rustfmt/issues/3322/comments","statuses_url":"https://api.github.com/repos/rust-lang/rustfmt/statuses/109394536dd05f51559a9b70a2efa018166c5061","head":{"label":"fyrchik:fix/3304","ref":"fix/3304","sha":"109394536dd05f51559a9b70a2efa018166c5061","user":{"login":"fyrchik","id":22011053,"node_id":"MDQ6VXNlcjIyMDExMDUz","avatar_url":"https://avatars0.githubusercontent.com/u/22011053?v=4","gravatar_id":"","url":"https://api.github.com/users/fyrchik","html_url":"https://github.com/fyrchik","followers_url":"https://api.github.com/users/fyrchik/followers","following_url":"https://api.github.com/users/fyrchik/following{/other_user}","gists_url":"https://api.github.com/users/fyrchik/gists{/gist_id}","starred_url":"https://api.github.com/users/fyrchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyrchik/subscriptions","organizations_url":"https://api.github.com/users/fyrchik/orgs","repos_url":"https://api.github.com/users/fyrchik/repos","events_url":"https://api.github.com/users/fyrchik/events{/privacy}","received_events_url":"https://api.github.com/users/fyrchik/received_events","type":"User","site_admin":false},"repo":{"id":169062134,"node_id":"MDEwOlJlcG9zaXRvcnkxNjkwNjIxMzQ=","name":"rustfmt","full_name":"fyrchik/rustfmt","private":false,"owner":{"login":"fyrchik","id":22011053,"node_id":"MDQ6VXNlcjIyMDExMDUz","avatar_url":"https://avatars0.githubusercontent.com/u/22011053?v=4","gravatar_id":"","url":"https://api.github.com/users/fyrchik","html_url":"https://github.com/fyrchik","followers_url":"https://api.github.com/users/fyrchik/followers","following_url":"https://api.github.com/users/fyrchik/following{/other_user}","gists_url":"https://api.github.com/users/fyrchik/gists{/gist_id}","starred_url":"https://api.github.com/users/fyrchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyrchik/subscriptions","organizations_url":"https://api.github.com/users/fyrchik/orgs","repos_url":"https://api.github.com/users/fyrchik/repos","events_url":"https://api.github.com/users/fyrchik/events{/privacy}","received_events_url":"https://api.github.com/users/fyrchik/received_events","type":"User","site_admin":false},"html_url":"https://github.com/fyrchik/rustfmt","description":"Format Rust code","fork":true,"url":"https://api.github.com/repos/fyrchik/rustfmt","forks_url":"https://api.github.com/repos/fyrchik/rustfmt/forks","keys_url":"https://api.github.com/repos/fyrchik/rustfmt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fyrchik/rustfmt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fyrchik/rustfmt/teams","hooks_url":"https://api.github.com/repos/fyrchik/rustfmt/hooks","issue_events_url":"https://api.github.com/repos/fyrchik/rustfmt/issues/events{/number}","events_url":"https://api.github.com/repos/fyrchik/rustfmt/events","assignees_url":"https://api.github.com/repos/fyrchik/rustfmt/assignees{/user}","branches_url":"https://api.github.com/repos/fyrchik/rustfmt/branches{/branch}","tags_url":"https://api.github.com/repos/fyrchik/rustfmt/tags","blobs_url":"https://api.github.com/repos/fyrchik/rustfmt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fyrchik/rustfmt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fyrchik/rustfmt/git/refs{/sha}","trees_url":"https://api.github.com/repos/fyrchik/rustfmt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fyrchik/rustfmt/statuses/{sha}","languages_url":"https://api.github.com/repos/fyrchik/rustfmt/languages","stargazers_url":"https://api.github.com/repos/fyrchik/rustfmt/stargazers","contributors_url":"https://api.github.com/repos/fyrchik/rustfmt/contributors","subscribers_url":"https://api.github.com/repos/fyrchik/rustfmt/subscribers","subscription_url":"https://api.github.com/repos/fyrchik/rustfmt/subscription","commits_url":"https://api.github.com/repos/fyrchik/rustfmt/commits{/sha}","git_commits_url":"https://api.github.com/repos/fyrchik/rustfmt/git/commits{/sha}","comments_url":"https://api.github.com/repos/fyrchik/rustfmt/comments{/number}","issue_comment_url":"https://api.github.com/repos/fyrchik/rustfmt/issues/comments{/number}","contents_url":"https://api.github.com/repos/fyrchik/rustfmt/contents/{+path}","compare_url":"https://api.github.com/repos/fyrchik/rustfmt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fyrchik/rustfmt/merges","archive_url":"https://api.github.com/repos/fyrchik/rustfmt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fyrchik/rustfmt/downloads","issues_url":"https://api.github.com/repos/fyrchik/rustfmt/issues{/number}","pulls_url":"https://api.github.com/repos/fyrchik/rustfmt/pulls{/number}","milestones_url":"https://api.github.com/repos/fyrchik/rustfmt/milestones{/number}","notifications_url":"https://api.github.com/repos/fyrchik/rustfmt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fyrchik/rustfmt/labels{/name}","releases_url":"https://api.github.com/repos/fyrchik/rustfmt/releases{/id}","deployments_url":"https://api.github.com/repos/fyrchik/rustfmt/deployments","created_at":"2019-02-04T10:31:32Z","updated_at":"2019-02-04T10:31:35Z","pushed_at":"2019-02-07T09:12:49Z","git_url":"git://github.com/fyrchik/rustfmt.git","ssh_url":"git@github.com:fyrchik/rustfmt.git","clone_url":"https://github.com/fyrchik/rustfmt.git","svn_url":"https://github.com/fyrchik/rustfmt","homepage":null,"size":8872,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"bc32f9fcf33a5713b3f2fa997c8400c7bfb82656","user":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","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":31830551,"node_id":"MDEwOlJlcG9zaXRvcnkzMTgzMDU1MQ==","name":"rustfmt","full_name":"rust-lang/rustfmt","private":false,"owner":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","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},"html_url":"https://github.com/rust-lang/rustfmt","description":"Format Rust code","fork":false,"url":"https://api.github.com/repos/rust-lang/rustfmt","forks_url":"https://api.github.com/repos/rust-lang/rustfmt/forks","keys_url":"https://api.github.com/repos/rust-lang/rustfmt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rustfmt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rustfmt/teams","hooks_url":"https://api.github.com/repos/rust-lang/rustfmt/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rustfmt/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rustfmt/events","assignees_url":"https://api.github.com/repos/rust-lang/rustfmt/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rustfmt/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rustfmt/tags","blobs_url":"https://api.github.com/repos/rust-lang/rustfmt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rustfmt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rustfmt/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rustfmt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rustfmt/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rustfmt/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rustfmt/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rustfmt/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rustfmt/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rustfmt/subscription","commits_url":"https://api.github.com/repos/rust-lang/rustfmt/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rustfmt/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rustfmt/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rustfmt/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rustfmt/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rustfmt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rustfmt/merges","archive_url":"https://api.github.com/repos/rust-lang/rustfmt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rustfmt/downloads","issues_url":"https://api.github.com/repos/rust-lang/rustfmt/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rustfmt/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rustfmt/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rustfmt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rustfmt/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rustfmt/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang/rustfmt/deployments","created_at":"2015-03-07T22:51:56Z","updated_at":"2019-02-07T02:54:39Z","pushed_at":"2019-02-07T09:12:51Z","git_url":"git://github.com/rust-lang/rustfmt.git","ssh_url":"git@github.com:rust-lang/rustfmt.git","clone_url":"https://github.com/rust-lang/rustfmt.git","svn_url":"https://github.com/rust-lang/rustfmt","homepage":null,"size":8874,"stargazers_count":2053,"watchers_count":2053,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":390,"mirror_url":null,"archived":false,"open_issues_count":212,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":390,"open_issues":212,"watchers":2053,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rustfmt/pulls/3322"},"html":{"href":"https://github.com/rust-lang/rustfmt/pull/3322"},"issue":{"href":"https://api.github.com/repos/rust-lang/rustfmt/issues/3322"},"comments":{"href":"https://api.github.com/repos/rust-lang/rustfmt/issues/3322/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rustfmt/pulls/3322/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rustfmt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rustfmt/pulls/3322/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rustfmt/statuses/109394536dd05f51559a9b70a2efa018166c5061"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"fyrchik"}}