{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/20667","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/20667/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/20667/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/20667/events","html_url":"https://github.com/rust-lang/rust/issues/20667","id":53574263,"number":20667,"title":"Guide chapter on Closures is inconsistent and incomplete","user":{"login":"jsgf","id":147966,"avatar_url":"https://avatars.githubusercontent.com/u/147966?v=3","gravatar_id":"","url":"https://api.github.com/users/jsgf","html_url":"https://github.com/jsgf","followers_url":"https://api.github.com/users/jsgf/followers","following_url":"https://api.github.com/users/jsgf/following{/other_user}","gists_url":"https://api.github.com/users/jsgf/gists{/gist_id}","starred_url":"https://api.github.com/users/jsgf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsgf/subscriptions","organizations_url":"https://api.github.com/users/jsgf/orgs","repos_url":"https://api.github.com/users/jsgf/repos","events_url":"https://api.github.com/users/jsgf/events{/privacy}","received_events_url":"https://api.github.com/users/jsgf/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-docs","name":"A-docs","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-06T22:53:32Z","updated_at":"2015-01-12T18:50:15Z","closed_at":"2015-01-12T18:50:15Z","body":"The Guide's discussion of Closures has several problems:\r\n\r\nIt doesn't explain the |&:| syntax at all. The examples have been updated to use it, but the prose still just talks about \"||\". I think this is the right place to clarify what |:|, |&:| and |&mut:| mean, and perhaps how they relate to the Fn traits (which I don't really understand, which I was looking here for clarification).\r\n\r\nThe example using \"twice()\" uses two different syntaxes. First it says:\r\n\r\n     fn twice<F: Fn(i32) -> i32>(x: i32, f: F) -> i32 {\r\n\r\nbut later it says\r\n\r\n    fn twice(x: i32, f: |i32| -> i32) -> i32 {\r\n\r\nAre these equivalent?\r\n\r\nI understand this is still in flux, and I gather the |:| syntax is going to go away (?) or become mostly optional(?) - either way, a paragraph with a bit of explanation would be useful."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/69622691","html_url":"https://github.com/rust-lang/rust/issues/20667#issuecomment-69622691","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/20667","id":69622691,"user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T18:50:15Z","updated_at":"2015-01-12T18:50:15Z","body":"Closing as a dup of https://github.com/rust-lang/rust/issues/19841"}}