{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/2809","repository_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt","labels_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/2809/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/2809/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/2809/events","html_url":"https://github.com/rust-lang-nursery/rustfmt/pull/2809","id":335644572,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MjkxNzE2","number":2809,"title":"Some formatting fixes","user":{"login":"nrc","id":762626,"node_id":"MDQ6VXNlcjc2MjYyNg==","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-26T03:26:42Z","updated_at":"2018-06-28T03:30:46Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls/2809","html_url":"https://github.com/rust-lang-nursery/rustfmt/pull/2809","diff_url":"https://github.com/rust-lang-nursery/rustfmt/pull/2809.diff","patch_url":"https://github.com/rust-lang-nursery/rustfmt/pull/2809.patch"},"body":"r? @topecongiro \r\n\r\nThe second commit is a bit big, sorry. The basic outline of the refactoring is to layout attributes iteratively rather than recursively, then get derive and non-derive code to share as much code as possible (unfortunately that is a lot less than I hoped).\r\n\r\nThe results are still not ideal - when we do full vertical formatting for a derive it is kind of silly looking (see one of the test fixups), but you need a lot of derives until you hit that. I'm not sure what would be better either - it is pretty consistent with functions, at least. It would be nice to combine attributes like we do for function attributes and to handle attributes with formatting strings like `println!`.\r\n\r\nLong term, attributes will be allowed to be just tokens, so we'll have the same problems as macros."},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/comments/400899596","html_url":"https://github.com/rust-lang-nursery/rustfmt/pull/2809#issuecomment-400899596","issue_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/2809","id":400899596,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDg5OTU5Ng==","user":{"login":"topecongiro","id":21980157,"node_id":"MDQ6VXNlcjIxOTgwMTU3","avatar_url":"https://avatars2.githubusercontent.com/u/21980157?v=4","gravatar_id":"","url":"https://api.github.com/users/topecongiro","html_url":"https://github.com/topecongiro","followers_url":"https://api.github.com/users/topecongiro/followers","following_url":"https://api.github.com/users/topecongiro/following{/other_user}","gists_url":"https://api.github.com/users/topecongiro/gists{/gist_id}","starred_url":"https://api.github.com/users/topecongiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topecongiro/subscriptions","organizations_url":"https://api.github.com/users/topecongiro/orgs","repos_url":"https://api.github.com/users/topecongiro/repos","events_url":"https://api.github.com/users/topecongiro/events{/privacy}","received_events_url":"https://api.github.com/users/topecongiro/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T03:30:46Z","updated_at":"2018-06-28T03:30:46Z","author_association":"MEMBER","body":"LGTM, thank you!\r\n\r\n> It would be nice to combine attributes like we do for function attributes and to handle attributes with formatting strings like println!.\r\n\r\nI think we could try to use `overflow::rewrite_with_parens`, but that could be a separate PR."}}
{"actor":{"display_login":"topecongiro"}}