{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/24948102","id":24948102,"diff_hunk":"@@ -677,6 +677,8 @@ macro_rules! iterator {\n             fn next(&mut self) -> Option<$elem> {\n                 // could be implemented with slices, but this avoids bounds checks\n                 unsafe {\n+                    ::intrinsics::assume(!self.ptr.is_null());\n+                    ::intrinsics::assume(!self.end.is_null());","path":"src/libcore/slice.rs","position":5,"original_position":5,"commit_id":"763e4894473cf3ddf92bd205634645f2d21dd74a","original_commit_id":"763e4894473cf3ddf92bd205634645f2d21dd74a","user":{"login":"Kimundi","id":2903206,"avatar_url":"https://avatars.githubusercontent.com/u/2903206?v=3","gravatar_id":"","url":"https://api.github.com/users/Kimundi","html_url":"https://github.com/Kimundi","followers_url":"https://api.github.com/users/Kimundi/followers","following_url":"https://api.github.com/users/Kimundi/following{/other_user}","gists_url":"https://api.github.com/users/Kimundi/gists{/gist_id}","starred_url":"https://api.github.com/users/Kimundi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kimundi/subscriptions","organizations_url":"https://api.github.com/users/Kimundi/orgs","repos_url":"https://api.github.com/users/Kimundi/repos","events_url":"https://api.github.com/users/Kimundi/events{/privacy}","received_events_url":"https://api.github.com/users/Kimundi/received_events","type":"User","site_admin":false},"body":"I talked with dotdash about - its not exactly duplication because the assumes are at a different location, and depending how the code will be inlined there might be cases where either of the two changes might not apply. Also, giving llvm multiple optimization hints can't really hurt.\r\n\r\nHowever, currently these hints are unneeded for my code anyway, because the optimized codepaths that depended on them did not end up in the current iteration of this PR, so if you'd rather have them removed for now I can do that too.","created_at":"2015-02-18T22:36:36Z","updated_at":"2015-02-18T22:36:36Z","html_url":"https://github.com/rust-lang/rust/pull/22466#discussion_r24948102","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/22466","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/24948102"},"html":{"href":"https://github.com/rust-lang/rust/pull/22466#discussion_r24948102"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/22466"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/22466","id":29483462,"html_url":"https://github.com/rust-lang/rust/pull/22466","diff_url":"https://github.com/rust-lang/rust/pull/22466.diff","patch_url":"https://github.com/rust-lang/rust/pull/22466.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/22466","number":22466,"state":"open","locked":false,"title":"WIP Implement the string pattern API","user":{"login":"Kimundi","id":2903206,"avatar_url":"https://avatars.githubusercontent.com/u/2903206?v=3","gravatar_id":"","url":"https://api.github.com/users/Kimundi","html_url":"https://github.com/Kimundi","followers_url":"https://api.github.com/users/Kimundi/followers","following_url":"https://api.github.com/users/Kimundi/following{/other_user}","gists_url":"https://api.github.com/users/Kimundi/gists{/gist_id}","starred_url":"https://api.github.com/users/Kimundi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kimundi/subscriptions","organizations_url":"https://api.github.com/users/Kimundi/orgs","repos_url":"https://api.github.com/users/Kimundi/repos","events_url":"https://api.github.com/users/Kimundi/events{/privacy}","received_events_url":"https://api.github.com/users/Kimundi/received_events","type":"User","site_admin":false},"body":"This is not a complete implementation of the RFC:\r\n\r\n- only existing methods got updated, no new ones added\r\n- doc comments are missing\r\n- commit history needs to be cleaned up\r\n- optimizations got lost and need to be reimplemented\r\n\r\nNB: The last few commits revert and reimplement a lot of the prior ones.\r\n\r\nSee https://github.com/rust-lang/rfcs/pull/528","created_at":"2015-02-17T22:22:51Z","updated_at":"2015-02-18T22:36:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f04b781a563a5d2ac94a407f4e1681fdbb7a1ab","assignee":{"login":"aturon","id":709807,"avatar_url":"https://avatars.githubusercontent.com/u/709807?v=3","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/22466/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/22466/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/22466/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/763e4894473cf3ddf92bd205634645f2d21dd74a","head":{"label":"Kimundi:str_pattern_ai_safe","ref":"str_pattern_ai_safe","sha":"763e4894473cf3ddf92bd205634645f2d21dd74a","user":{"login":"Kimundi","id":2903206,"avatar_url":"https://avatars.githubusercontent.com/u/2903206?v=3","gravatar_id":"","url":"https://api.github.com/users/Kimundi","html_url":"https://github.com/Kimundi","followers_url":"https://api.github.com/users/Kimundi/followers","following_url":"https://api.github.com/users/Kimundi/following{/other_user}","gists_url":"https://api.github.com/users/Kimundi/gists{/gist_id}","starred_url":"https://api.github.com/users/Kimundi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kimundi/subscriptions","organizations_url":"https://api.github.com/users/Kimundi/orgs","repos_url":"https://api.github.com/users/Kimundi/repos","events_url":"https://api.github.com/users/Kimundi/events{/privacy}","received_events_url":"https://api.github.com/users/Kimundi/received_events","type":"User","site_admin":false},"repo":{"id":7525322,"name":"rust","full_name":"Kimundi/rust","owner":{"login":"Kimundi","id":2903206,"avatar_url":"https://avatars.githubusercontent.com/u/2903206?v=3","gravatar_id":"","url":"https://api.github.com/users/Kimundi","html_url":"https://github.com/Kimundi","followers_url":"https://api.github.com/users/Kimundi/followers","following_url":"https://api.github.com/users/Kimundi/following{/other_user}","gists_url":"https://api.github.com/users/Kimundi/gists{/gist_id}","starred_url":"https://api.github.com/users/Kimundi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kimundi/subscriptions","organizations_url":"https://api.github.com/users/Kimundi/orgs","repos_url":"https://api.github.com/users/Kimundi/repos","events_url":"https://api.github.com/users/Kimundi/events{/privacy}","received_events_url":"https://api.github.com/users/Kimundi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kimundi/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/Kimundi/rust","forks_url":"https://api.github.com/repos/Kimundi/rust/forks","keys_url":"https://api.github.com/repos/Kimundi/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kimundi/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kimundi/rust/teams","hooks_url":"https://api.github.com/repos/Kimundi/rust/hooks","issue_events_url":"https://api.github.com/repos/Kimundi/rust/issues/events{/number}","events_url":"https://api.github.com/repos/Kimundi/rust/events","assignees_url":"https://api.github.com/repos/Kimundi/rust/assignees{/user}","branches_url":"https://api.github.com/repos/Kimundi/rust/branches{/branch}","tags_url":"https://api.github.com/repos/Kimundi/rust/tags","blobs_url":"https://api.github.com/repos/Kimundi/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kimundi/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kimundi/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kimundi/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kimundi/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/Kimundi/rust/languages","stargazers_url":"https://api.github.com/repos/Kimundi/rust/stargazers","contributors_url":"https://api.github.com/repos/Kimundi/rust/contributors","subscribers_url":"https://api.github.com/repos/Kimundi/rust/subscribers","subscription_url":"https://api.github.com/repos/Kimundi/rust/subscription","commits_url":"https://api.github.com/repos/Kimundi/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kimundi/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kimundi/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kimundi/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/Kimundi/rust/contents/{+path}","compare_url":"https://api.github.com/repos/Kimundi/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kimundi/rust/merges","archive_url":"https://api.github.com/repos/Kimundi/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kimundi/rust/downloads","issues_url":"https://api.github.com/repos/Kimundi/rust/issues{/number}","pulls_url":"https://api.github.com/repos/Kimundi/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/Kimundi/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/Kimundi/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kimundi/rust/labels{/name}","releases_url":"https://api.github.com/repos/Kimundi/rust/releases{/id}","created_at":"2013-01-09T17:13:13Z","updated_at":"2015-02-10T13:42:29Z","pushed_at":"2015-02-18T15:04:27Z","git_url":"git://github.com/Kimundi/rust.git","ssh_url":"git@github.com:Kimundi/rust.git","clone_url":"https://github.com/Kimundi/rust.git","svn_url":"https://github.com/Kimundi/rust","homepage":"http://www.rust-lang.org","size":236974,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"6c065fc8cb036785f61ff03e05c1563cbb2dd081","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-02-18T19:58:39Z","pushed_at":"2015-02-18T22:10:05Z","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":480495,"stargazers_count":9438,"watchers_count":9438,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1807,"mirror_url":null,"open_issues_count":1907,"forks":1807,"open_issues":1907,"watchers":9438,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/22466"},"html":{"href":"https://github.com/rust-lang/rust/pull/22466"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/22466"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/22466/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/22466/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/22466/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/763e4894473cf3ddf92bd205634645f2d21dd74a"}}}}