{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/189435496","pull_request_review_id":121620143,"id":189435496,"diff_hunk":"@@ -836,6 +837,52 @@ macro_rules! float_sum_product {\n integer_sum_product! { i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize }\n float_sum_product! { f32 f64 }\n \n+#[stable(feature = \"iter_arith_traits_option\", since=\"1.29.0\")]","path":"src/libcore/iter/traits.rs","position":12,"original_position":12,"commit_id":"c1cb1ff5e2d11d0fe321323202d2c663741e22a9","original_commit_id":"c1cb1ff5e2d11d0fe321323202d2c663741e22a9","user":{"login":"kennytm","id":103023,"avatar_url":"https://avatars1.githubusercontent.com/u/103023?v=4","gravatar_id":"","url":"https://api.github.com/users/kennytm","html_url":"https://github.com/kennytm","followers_url":"https://api.github.com/users/kennytm/followers","following_url":"https://api.github.com/users/kennytm/following{/other_user}","gists_url":"https://api.github.com/users/kennytm/gists{/gist_id}","starred_url":"https://api.github.com/users/kennytm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennytm/subscriptions","organizations_url":"https://api.github.com/users/kennytm/orgs","repos_url":"https://api.github.com/users/kennytm/repos","events_url":"https://api.github.com/users/kennytm/events{/privacy}","received_events_url":"https://api.github.com/users/kennytm/received_events","type":"User","site_admin":false},"body":"Should be 1.28.0 😄 ","created_at":"2018-05-19T14:14:13Z","updated_at":"2018-05-19T14:15:35Z","html_url":"https://github.com/rust-lang/rust/pull/50884#discussion_r189435496","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/50884","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/189435496"},"html":{"href":"https://github.com/rust-lang/rust/pull/50884#discussion_r189435496"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50884"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/50884","id":189167040,"html_url":"https://github.com/rust-lang/rust/pull/50884","diff_url":"https://github.com/rust-lang/rust/pull/50884.diff","patch_url":"https://github.com/rust-lang/rust/pull/50884.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/50884","number":50884,"state":"open","locked":false,"title":"Implement iter::{Sum<U>, Product<U>} for Option<T>","user":{"login":"Emerentius","id":9992929,"avatar_url":"https://avatars3.githubusercontent.com/u/9992929?v=4","gravatar_id":"","url":"https://api.github.com/users/Emerentius","html_url":"https://github.com/Emerentius","followers_url":"https://api.github.com/users/Emerentius/followers","following_url":"https://api.github.com/users/Emerentius/following{/other_user}","gists_url":"https://api.github.com/users/Emerentius/gists{/gist_id}","starred_url":"https://api.github.com/users/Emerentius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emerentius/subscriptions","organizations_url":"https://api.github.com/users/Emerentius/orgs","repos_url":"https://api.github.com/users/Emerentius/repos","events_url":"https://api.github.com/users/Emerentius/events{/privacy}","received_events_url":"https://api.github.com/users/Emerentius/received_events","type":"User","site_admin":false},"body":"This implements `{Sum<U>, Product<U>} for Option<T>` such that it returns `None` if the iter is empty.\r\nThat allows one to distinguish between an empty iter and iters that sum/multiply to their neutral element.\r\n\r\nThere's an alternative way of summing into `Option<T>`, which doesn't require a neutral starting element and therefore no `T: Sum / Product` bound. It works by taking the first element and then adding / multiplying the rest onto that, but it can't accomodate the case of different types such as `Iterator<Item = U> -> Option<T>`. This PR keeps in line with the rest of the trait impls and therefore does require `T: Sum<U>`.\r\n\r\nThis impl is for a stable trait and would therefore be insta-stable if merged.","created_at":"2018-05-19T02:43:41Z","updated_at":"2018-05-19T14:15:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d80e4fd962ba4ee9860cece5d77c04eb8566ed4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":583426710,"url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-review","name":"S-waiting-on-review","color":"d3dddd","default":false},{"id":211668062,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-libs","name":"T-libs","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/50884/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/50884/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/50884/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/c1cb1ff5e2d11d0fe321323202d2c663741e22a9","head":{"label":"Emerentius:iter_arith_traits_option","ref":"iter_arith_traits_option","sha":"c1cb1ff5e2d11d0fe321323202d2c663741e22a9","user":{"login":"Emerentius","id":9992929,"avatar_url":"https://avatars3.githubusercontent.com/u/9992929?v=4","gravatar_id":"","url":"https://api.github.com/users/Emerentius","html_url":"https://github.com/Emerentius","followers_url":"https://api.github.com/users/Emerentius/followers","following_url":"https://api.github.com/users/Emerentius/following{/other_user}","gists_url":"https://api.github.com/users/Emerentius/gists{/gist_id}","starred_url":"https://api.github.com/users/Emerentius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emerentius/subscriptions","organizations_url":"https://api.github.com/users/Emerentius/orgs","repos_url":"https://api.github.com/users/Emerentius/repos","events_url":"https://api.github.com/users/Emerentius/events{/privacy}","received_events_url":"https://api.github.com/users/Emerentius/received_events","type":"User","site_admin":false},"repo":{"id":131217433,"name":"rust","full_name":"Emerentius/rust","owner":{"login":"Emerentius","id":9992929,"avatar_url":"https://avatars3.githubusercontent.com/u/9992929?v=4","gravatar_id":"","url":"https://api.github.com/users/Emerentius","html_url":"https://github.com/Emerentius","followers_url":"https://api.github.com/users/Emerentius/followers","following_url":"https://api.github.com/users/Emerentius/following{/other_user}","gists_url":"https://api.github.com/users/Emerentius/gists{/gist_id}","starred_url":"https://api.github.com/users/Emerentius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emerentius/subscriptions","organizations_url":"https://api.github.com/users/Emerentius/orgs","repos_url":"https://api.github.com/users/Emerentius/repos","events_url":"https://api.github.com/users/Emerentius/events{/privacy}","received_events_url":"https://api.github.com/users/Emerentius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Emerentius/rust","description":"A safe, concurrent, practical language.","fork":true,"url":"https://api.github.com/repos/Emerentius/rust","forks_url":"https://api.github.com/repos/Emerentius/rust/forks","keys_url":"https://api.github.com/repos/Emerentius/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Emerentius/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Emerentius/rust/teams","hooks_url":"https://api.github.com/repos/Emerentius/rust/hooks","issue_events_url":"https://api.github.com/repos/Emerentius/rust/issues/events{/number}","events_url":"https://api.github.com/repos/Emerentius/rust/events","assignees_url":"https://api.github.com/repos/Emerentius/rust/assignees{/user}","branches_url":"https://api.github.com/repos/Emerentius/rust/branches{/branch}","tags_url":"https://api.github.com/repos/Emerentius/rust/tags","blobs_url":"https://api.github.com/repos/Emerentius/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Emerentius/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Emerentius/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/Emerentius/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Emerentius/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/Emerentius/rust/languages","stargazers_url":"https://api.github.com/repos/Emerentius/rust/stargazers","contributors_url":"https://api.github.com/repos/Emerentius/rust/contributors","subscribers_url":"https://api.github.com/repos/Emerentius/rust/subscribers","subscription_url":"https://api.github.com/repos/Emerentius/rust/subscription","commits_url":"https://api.github.com/repos/Emerentius/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/Emerentius/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/Emerentius/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/Emerentius/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/Emerentius/rust/contents/{+path}","compare_url":"https://api.github.com/repos/Emerentius/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Emerentius/rust/merges","archive_url":"https://api.github.com/repos/Emerentius/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Emerentius/rust/downloads","issues_url":"https://api.github.com/repos/Emerentius/rust/issues{/number}","pulls_url":"https://api.github.com/repos/Emerentius/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/Emerentius/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/Emerentius/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Emerentius/rust/labels{/name}","releases_url":"https://api.github.com/repos/Emerentius/rust/releases{/id}","deployments_url":"https://api.github.com/repos/Emerentius/rust/deployments","created_at":"2018-04-26T22:33:28Z","updated_at":"2018-05-13T02:25:42Z","pushed_at":"2018-05-19T03:08:37Z","git_url":"git://github.com/Emerentius/rust.git","ssh_url":"git@github.com:Emerentius/rust.git","clone_url":"https://github.com/Emerentius/rust.git","svn_url":"https://github.com/Emerentius/rust","homepage":"https://www.rust-lang.org","size":370696,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"37a409177c80e6f301c41833fc7ee8fda2412c00","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars1.githubusercontent.com/u/5430905?v=4","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://avatars1.githubusercontent.com/u/5430905?v=4","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}","deployments_url":"https://api.github.com/repos/rust-lang/rust/deployments","created_at":"2010-06-16T20:39:03Z","updated_at":"2018-05-19T12:51:51Z","pushed_at":"2018-05-19T12:47:53Z","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":"https://www.rust-lang.org","size":371022,"stargazers_count":28329,"watchers_count":28329,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4925,"mirror_url":null,"archived":false,"open_issues_count":3804,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4925,"open_issues":3804,"watchers":28329,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50884"},"html":{"href":"https://github.com/rust-lang/rust/pull/50884"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/50884"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/50884/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50884/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/50884/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/c1cb1ff5e2d11d0fe321323202d2c663741e22a9"}},"author_association":"NONE"}}
{"actor":{"display_login":"kennytm"}}