{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/27538529","id":27538529,"diff_hunk":"@@ -25,23 +25,22 @@\n //! the `FromIterator` trait for creating a container from an iterator, and much\n //! more.\n //!\n-//! ## Rust's `for` loop\n+//! # Rust's `for` loop\n //!\n-//! The special syntax used by rust's `for` loop is based around the `Iterator`\n-//! trait defined in this module. For loops can be viewed as a syntactical expansion\n+//! The special syntax used by rust's `for` loop is based around the `IntoIterator`\n+//! trait defined in this module. `for` loops can be viewed as a syntactical expansion\n //! into a `loop`, for example, the `for` loop in this example is essentially\n //! translated to the `loop` below.\n //!\n //! ```\n //! let values = vec![1, 2, 3];\n //!\n-//! // \"Syntactical sugar\" taking advantage of an iterator\n-//! for &x in values.iter() {\n+//! for x in values {\n //!     println!(\"{}\", x);\n //! }\n //!\n //! // Rough translation of the iteration without a `for` iterator.\n-//! let mut it = values.iter();\n+//! let mut it = values.into_iter();","path":"src/libcore/iter.rs","position":25,"original_position":25,"commit_id":"cf5616242a1d724a374e0da5f7e247765178a769","original_commit_id":"cf5616242a1d724a374e0da5f7e247765178a769","user":{"login":"frewsxcv","id":416575,"avatar_url":"https://avatars.githubusercontent.com/u/416575?v=3","gravatar_id":"","url":"https://api.github.com/users/frewsxcv","html_url":"https://github.com/frewsxcv","followers_url":"https://api.github.com/users/frewsxcv/followers","following_url":"https://api.github.com/users/frewsxcv/following{/other_user}","gists_url":"https://api.github.com/users/frewsxcv/gists{/gist_id}","starred_url":"https://api.github.com/users/frewsxcv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frewsxcv/subscriptions","organizations_url":"https://api.github.com/users/frewsxcv/orgs","repos_url":"https://api.github.com/users/frewsxcv/repos","events_url":"https://api.github.com/users/frewsxcv/events{/privacy}","received_events_url":"https://api.github.com/users/frewsxcv/received_events","type":"User","site_admin":false},"body":"I don't think this will work since `values` gets moved above","created_at":"2015-04-01T01:21:36Z","updated_at":"2015-04-01T01:21:36Z","html_url":"https://github.com/rust-lang/rust/pull/23899#discussion_r27538529","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/23899","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/27538529"},"html":{"href":"https://github.com/rust-lang/rust/pull/23899#discussion_r27538529"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/23899"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/23899","id":32353786,"html_url":"https://github.com/rust-lang/rust/pull/23899","diff_url":"https://github.com/rust-lang/rust/pull/23899.diff","patch_url":"https://github.com/rust-lang/rust/pull/23899.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/23899","number":23899,"state":"open","locked":false,"title":"Fix up iterator documentation with regards to for loop sugar","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},"body":"Fixes #23851","created_at":"2015-03-31T18:55:37Z","updated_at":"2015-04-01T01:21:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43f08c470712ac0d52aef65780d03a9c74199bb2","assignee":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/23899/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/23899/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/23899/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/cf5616242a1d724a374e0da5f7e247765178a769","head":{"label":"steveklabnik:gh23851","ref":"gh23851","sha":"cf5616242a1d724a374e0da5f7e247765178a769","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},"repo":{"id":7349289,"name":"rust","full_name":"steveklabnik/rust","owner":{"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},"private":false,"html_url":"https://github.com/steveklabnik/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/steveklabnik/rust","forks_url":"https://api.github.com/repos/steveklabnik/rust/forks","keys_url":"https://api.github.com/repos/steveklabnik/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/steveklabnik/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/steveklabnik/rust/teams","hooks_url":"https://api.github.com/repos/steveklabnik/rust/hooks","issue_events_url":"https://api.github.com/repos/steveklabnik/rust/issues/events{/number}","events_url":"https://api.github.com/repos/steveklabnik/rust/events","assignees_url":"https://api.github.com/repos/steveklabnik/rust/assignees{/user}","branches_url":"https://api.github.com/repos/steveklabnik/rust/branches{/branch}","tags_url":"https://api.github.com/repos/steveklabnik/rust/tags","blobs_url":"https://api.github.com/repos/steveklabnik/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/steveklabnik/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/steveklabnik/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/steveklabnik/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/steveklabnik/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/steveklabnik/rust/languages","stargazers_url":"https://api.github.com/repos/steveklabnik/rust/stargazers","contributors_url":"https://api.github.com/repos/steveklabnik/rust/contributors","subscribers_url":"https://api.github.com/repos/steveklabnik/rust/subscribers","subscription_url":"https://api.github.com/repos/steveklabnik/rust/subscription","commits_url":"https://api.github.com/repos/steveklabnik/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/steveklabnik/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/steveklabnik/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/steveklabnik/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/steveklabnik/rust/contents/{+path}","compare_url":"https://api.github.com/repos/steveklabnik/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/steveklabnik/rust/merges","archive_url":"https://api.github.com/repos/steveklabnik/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/steveklabnik/rust/downloads","issues_url":"https://api.github.com/repos/steveklabnik/rust/issues{/number}","pulls_url":"https://api.github.com/repos/steveklabnik/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/steveklabnik/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/steveklabnik/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/steveklabnik/rust/labels{/name}","releases_url":"https://api.github.com/repos/steveklabnik/rust/releases{/id}","created_at":"2012-12-28T03:07:04Z","updated_at":"2015-03-30T16:33:28Z","pushed_at":"2015-04-01T00:18:34Z","git_url":"git://github.com/steveklabnik/rust.git","ssh_url":"git@github.com:steveklabnik/rust.git","clone_url":"https://github.com/steveklabnik/rust.git","svn_url":"https://github.com/steveklabnik/rust","homepage":"http://www.rust-lang.org","size":269274,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"80bf31dd514055177b22c3dc66836d39eb5b1648","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","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":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","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},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"a safe, concurrent, practical language","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","created_at":"2010-06-16T20:39:03Z","updated_at":"2015-04-01T00:45:07Z","pushed_at":"2015-04-01T01:07:36Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"http://www.rust-lang.org","size":531828,"stargazers_count":9914,"watchers_count":9914,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1929,"mirror_url":null,"open_issues_count":2071,"forks":1929,"open_issues":2071,"watchers":9914,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/23899"},"html":{"href":"https://github.com/rust-lang/rust/pull/23899"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/23899"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/23899/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/23899/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/23899/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/cf5616242a1d724a374e0da5f7e247765178a769"}}}}