{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1373","repository_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt","labels_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1373/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1373/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1373/events","html_url":"https://github.com/rust-lang-nursery/rustfmt/issues/1373","id":213524883,"number":1373,"title":"reorder_imports does not respect comments","user":{"login":"malbarbo","id":1678126,"avatar_url":"https://avatars0.githubusercontent.com/u/1678126?v=3","gravatar_id":"","url":"https://api.github.com/users/malbarbo","html_url":"https://github.com/malbarbo","followers_url":"https://api.github.com/users/malbarbo/followers","following_url":"https://api.github.com/users/malbarbo/following{/other_user}","gists_url":"https://api.github.com/users/malbarbo/gists{/gist_id}","starred_url":"https://api.github.com/users/malbarbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malbarbo/subscriptions","organizations_url":"https://api.github.com/users/malbarbo/orgs","repos_url":"https://api.github.com/users/malbarbo/repos","events_url":"https://api.github.com/users/malbarbo/events{/privacy}","received_events_url":"https://api.github.com/users/malbarbo/received_events","type":"User","site_admin":false},"labels":[{"id":276648570,"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/labels/comments","name":"comments","color":"207de5","default":false},{"id":254427039,"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/labels/poor-formatting","name":"poor-formatting","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-11T12:02:09Z","updated_at":"2017-05-17T20:13:54Z","closed_at":null,"body":"```rust\r\n// Comment 1\r\nuse std::mem;\r\nuse std::marker;\r\n\r\n// Comment 2\r\nuse std::iter;\r\n\r\npub fn main() {}\r\n```\r\n\r\nrustfmt produces\r\n\r\n```rust\r\n// Comment 1\r\n\r\n\r\n// Comment 2\r\nuse std::iter;\r\nuse std::marker;\r\nuse std::mem;\r\n\r\npub fn main() {}\r\n```\r\n\r\nThe comment 1 lost their context. I would expect something like:\r\n\r\n```rust\r\n// Comment 1\r\nuse std::marker;\r\nuse std::mem;\r\n\r\n// Comment 2\r\nuse std::iter;\r\n\r\npub fn main() {}\r\n```\r\n\r\nMaybe related with https://github.com/rust-lang-nursery/rustfmt/issues/1137"},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/comments/302218437","html_url":"https://github.com/rust-lang-nursery/rustfmt/issues/1373#issuecomment-302218437","issue_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1373","id":302218437,"user":{"login":"nrc","id":762626,"avatar_url":"https://avatars3.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":"2017-05-17T20:13:54Z","updated_at":"2017-05-17T20:13:54Z","body":"@ishitatsuyuki I'm not clear - are you saying the example is expected but doesn't happen or happens but shouldn't? It looks correct to me (that is the 'sticky' comment sticks to the import of `b`)."}}
{"actor":{"display_login":"nrc"}}