{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1204","repository_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt","labels_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1204/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1204/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1204/events","html_url":"https://github.com/rust-lang-nursery/rustfmt/issues/1204","id":186226554,"number":1204,"title":"Cargofmt changing return type to the literal string TODO","user":{"login":"lespea","id":99605,"avatar_url":"https://avatars.githubusercontent.com/u/99605?v=3","gravatar_id":"","url":"https://api.github.com/users/lespea","html_url":"https://github.com/lespea","followers_url":"https://api.github.com/users/lespea/followers","following_url":"https://api.github.com/users/lespea/following{/other_user}","gists_url":"https://api.github.com/users/lespea/gists{/gist_id}","starred_url":"https://api.github.com/users/lespea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lespea/subscriptions","organizations_url":"https://api.github.com/users/lespea/orgs","repos_url":"https://api.github.com/users/lespea/repos","events_url":"https://api.github.com/users/lespea/events{/privacy}","received_events_url":"https://api.github.com/users/lespea/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-31T08:13:04Z","updated_at":"2016-11-06T21:43:01Z","closed_at":"2016-11-06T21:43:01Z","body":"Using this example:\r\n\r\n```\r\n#![feature(conservative_impl_trait)]\r\n\r\npub fn test() -> impl std::iter::Iterator<Item = u32> {\r\n    (0..10)\r\n}\r\n\r\nfn main() {\r\n    for i in test() {\r\n        println!(\"{}\", i)\r\n    }\r\n}\r\n```\r\n\r\nWhen `cargo fmt` is run, the output is changed to this:\r\n\r\n```\r\n#![feature(conservative_impl_trait)]\r\n\r\npub fn test() -> impl TODO {\r\n    (0..10)\r\n}\r\n\r\nfn main() {\r\n    for i in test() {\r\n        println!(\"{}\", i)\r\n    }\r\n}\r\n```\r\n\r\nMaybe returning impl isn't yet supported by cargofmt but it's pretty shocking that a source formatting tool would change a signature type if it doesn't understand it.\r\n\r\nVersion info:\r\n\r\n```\r\ncargo fmt -- --version\r\n0.6.2 ()\r\n````\r\n\r\n```\r\nrustc --version\r\nrustc 1.14.0-nightly (3f4408347 2016-10-27)\r\n```\r\n\r\nHighly doubtful it matters but I'm on windows 10."},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/comments/258713076","html_url":"https://github.com/rust-lang-nursery/rustfmt/issues/1204#issuecomment-258713076","issue_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1204","id":258713076,"user":{"login":"nrc","id":762626,"avatar_url":"https://avatars.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":"2016-11-06T21:43:01Z","updated_at":"2016-11-06T21:43:01Z","body":"This should be fixed on master now, I'll roll a new release this week which should include this fix."}}
{"actor":{"display_login":"nrc"}}