{"action":"created","comment":{"url":"https://api.github.com/repos/dlang/druntime/pulls/comments/192090653","pull_request_review_id":124794534,"id":192090653,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjA5MDY1Mw==","diff_hunk":"@@ -135,7 +135,7 @@ size_t hashOf(T)(auto ref T val, size_t seed = 0) if (!is(T == enum) && (is(T ==\n         static if (is(typeof(toUbyte(val)) == const(ubyte)[]))//CTFE ready for structs without reference fields\n         {\n             auto bytes = toUbyte(val);\n-            return bytesHash(bytes.ptr, bytes.length, seed);\n+            return (() @trusted => bytesHash(bytes.ptr, bytes.length, seed))();","path":"src/core/internal/hash.d","position":5,"original_position":5,"commit_id":"deda34fd7736e87f22d5c0e42d72a5c750cf3193","original_commit_id":"deda34fd7736e87f22d5c0e42d72a5c750cf3193","user":{"login":"n8sh","id":21227491,"node_id":"MDQ6VXNlcjIxMjI3NDkx","avatar_url":"https://avatars2.githubusercontent.com/u/21227491?v=4","gravatar_id":"","url":"https://api.github.com/users/n8sh","html_url":"https://github.com/n8sh","followers_url":"https://api.github.com/users/n8sh/followers","following_url":"https://api.github.com/users/n8sh/following{/other_user}","gists_url":"https://api.github.com/users/n8sh/gists{/gist_id}","starred_url":"https://api.github.com/users/n8sh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n8sh/subscriptions","organizations_url":"https://api.github.com/users/n8sh/orgs","repos_url":"https://api.github.com/users/n8sh/repos","events_url":"https://api.github.com/users/n8sh/events{/privacy}","received_events_url":"https://api.github.com/users/n8sh/received_events","type":"User","site_admin":false},"body":">Perhaps add an overload to take an array instead of pointer and length pair as well.\r\n\r\nI could add a `@trusted` overload that calls `bytesHash` if you think that buys us anything over the `@trusted` lambda that calls `bytesHash`. My sole concern is that it might result in worse machine code, since the compiler might treat inline lambdas more intelligently. I'll take a look.","created_at":"2018-05-31T13:01:42Z","updated_at":"2018-05-31T13:01:42Z","html_url":"https://github.com/dlang/druntime/pull/2200#discussion_r192090653","pull_request_url":"https://api.github.com/repos/dlang/druntime/pulls/2200","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dlang/druntime/pulls/comments/192090653"},"html":{"href":"https://github.com/dlang/druntime/pull/2200#discussion_r192090653"},"pull_request":{"href":"https://api.github.com/repos/dlang/druntime/pulls/2200"}},"in_reply_to_id":192067954},"pull_request":{"url":"https://api.github.com/repos/dlang/druntime/pulls/2200","id":191686522,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNjg2NTIy","html_url":"https://github.com/dlang/druntime/pull/2200","diff_url":"https://github.com/dlang/druntime/pull/2200.diff","patch_url":"https://github.com/dlang/druntime/pull/2200.patch","issue_url":"https://api.github.com/repos/dlang/druntime/issues/2200","number":2200,"state":"open","locked":false,"title":"Fix Issue 18925 - core.internal.hash auto-hash for structs of scalar fields should be `@safe`","user":{"login":"n8sh","id":21227491,"node_id":"MDQ6VXNlcjIxMjI3NDkx","avatar_url":"https://avatars2.githubusercontent.com/u/21227491?v=4","gravatar_id":"","url":"https://api.github.com/users/n8sh","html_url":"https://github.com/n8sh","followers_url":"https://api.github.com/users/n8sh/followers","following_url":"https://api.github.com/users/n8sh/following{/other_user}","gists_url":"https://api.github.com/users/n8sh/gists{/gist_id}","starred_url":"https://api.github.com/users/n8sh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n8sh/subscriptions","organizations_url":"https://api.github.com/users/n8sh/orgs","repos_url":"https://api.github.com/users/n8sh/repos","events_url":"https://api.github.com/users/n8sh/events{/privacy}","received_events_url":"https://api.github.com/users/n8sh/received_events","type":"User","site_admin":false},"body":"This patch enables:\r\n```d\r\n@safe unittest\r\n{\r\n    import core.internal.hash : hashOf;\r\n    static struct S { int a; int b; }\r\n    auto h = hashOf(S.init);\r\n}\r\n```","created_at":"2018-05-31T08:58:02Z","updated_at":"2018-05-31T13:01:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0924e8eaf15925646cb3800f3650387140f02a0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"MartinNowak","id":288976,"node_id":"MDQ6VXNlcjI4ODk3Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/288976?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinNowak","html_url":"https://github.com/MartinNowak","followers_url":"https://api.github.com/users/MartinNowak/followers","following_url":"https://api.github.com/users/MartinNowak/following{/other_user}","gists_url":"https://api.github.com/users/MartinNowak/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinNowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinNowak/subscriptions","organizations_url":"https://api.github.com/users/MartinNowak/orgs","repos_url":"https://api.github.com/users/MartinNowak/repos","events_url":"https://api.github.com/users/MartinNowak/events{/privacy}","received_events_url":"https://api.github.com/users/MartinNowak/received_events","type":"User","site_admin":false},{"login":"schveiguy","id":580778,"node_id":"MDQ6VXNlcjU4MDc3OA==","avatar_url":"https://avatars0.githubusercontent.com/u/580778?v=4","gravatar_id":"","url":"https://api.github.com/users/schveiguy","html_url":"https://github.com/schveiguy","followers_url":"https://api.github.com/users/schveiguy/followers","following_url":"https://api.github.com/users/schveiguy/following{/other_user}","gists_url":"https://api.github.com/users/schveiguy/gists{/gist_id}","starred_url":"https://api.github.com/users/schveiguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schveiguy/subscriptions","organizations_url":"https://api.github.com/users/schveiguy/orgs","repos_url":"https://api.github.com/users/schveiguy/repos","events_url":"https://api.github.com/users/schveiguy/events{/privacy}","received_events_url":"https://api.github.com/users/schveiguy/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":638910588,"node_id":"MDU6TGFiZWw2Mzg5MTA1ODg=","url":"https://api.github.com/repos/dlang/druntime/labels/Enhancement","name":"Enhancement","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dlang/druntime/pulls/2200/commits","review_comments_url":"https://api.github.com/repos/dlang/druntime/pulls/2200/comments","review_comment_url":"https://api.github.com/repos/dlang/druntime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dlang/druntime/issues/2200/comments","statuses_url":"https://api.github.com/repos/dlang/druntime/statuses/deda34fd7736e87f22d5c0e42d72a5c750cf3193","head":{"label":"n8sh:core-hash-18925","ref":"core-hash-18925","sha":"deda34fd7736e87f22d5c0e42d72a5c750cf3193","user":{"login":"n8sh","id":21227491,"node_id":"MDQ6VXNlcjIxMjI3NDkx","avatar_url":"https://avatars2.githubusercontent.com/u/21227491?v=4","gravatar_id":"","url":"https://api.github.com/users/n8sh","html_url":"https://github.com/n8sh","followers_url":"https://api.github.com/users/n8sh/followers","following_url":"https://api.github.com/users/n8sh/following{/other_user}","gists_url":"https://api.github.com/users/n8sh/gists{/gist_id}","starred_url":"https://api.github.com/users/n8sh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n8sh/subscriptions","organizations_url":"https://api.github.com/users/n8sh/orgs","repos_url":"https://api.github.com/users/n8sh/repos","events_url":"https://api.github.com/users/n8sh/events{/privacy}","received_events_url":"https://api.github.com/users/n8sh/received_events","type":"User","site_admin":false},"repo":{"id":112772191,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI3NzIxOTE=","name":"druntime","full_name":"n8sh/druntime","owner":{"login":"n8sh","id":21227491,"node_id":"MDQ6VXNlcjIxMjI3NDkx","avatar_url":"https://avatars2.githubusercontent.com/u/21227491?v=4","gravatar_id":"","url":"https://api.github.com/users/n8sh","html_url":"https://github.com/n8sh","followers_url":"https://api.github.com/users/n8sh/followers","following_url":"https://api.github.com/users/n8sh/following{/other_user}","gists_url":"https://api.github.com/users/n8sh/gists{/gist_id}","starred_url":"https://api.github.com/users/n8sh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n8sh/subscriptions","organizations_url":"https://api.github.com/users/n8sh/orgs","repos_url":"https://api.github.com/users/n8sh/repos","events_url":"https://api.github.com/users/n8sh/events{/privacy}","received_events_url":"https://api.github.com/users/n8sh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/n8sh/druntime","description":"Low level runtime library for the D programming language","fork":true,"url":"https://api.github.com/repos/n8sh/druntime","forks_url":"https://api.github.com/repos/n8sh/druntime/forks","keys_url":"https://api.github.com/repos/n8sh/druntime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/n8sh/druntime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/n8sh/druntime/teams","hooks_url":"https://api.github.com/repos/n8sh/druntime/hooks","issue_events_url":"https://api.github.com/repos/n8sh/druntime/issues/events{/number}","events_url":"https://api.github.com/repos/n8sh/druntime/events","assignees_url":"https://api.github.com/repos/n8sh/druntime/assignees{/user}","branches_url":"https://api.github.com/repos/n8sh/druntime/branches{/branch}","tags_url":"https://api.github.com/repos/n8sh/druntime/tags","blobs_url":"https://api.github.com/repos/n8sh/druntime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/n8sh/druntime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/n8sh/druntime/git/refs{/sha}","trees_url":"https://api.github.com/repos/n8sh/druntime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/n8sh/druntime/statuses/{sha}","languages_url":"https://api.github.com/repos/n8sh/druntime/languages","stargazers_url":"https://api.github.com/repos/n8sh/druntime/stargazers","contributors_url":"https://api.github.com/repos/n8sh/druntime/contributors","subscribers_url":"https://api.github.com/repos/n8sh/druntime/subscribers","subscription_url":"https://api.github.com/repos/n8sh/druntime/subscription","commits_url":"https://api.github.com/repos/n8sh/druntime/commits{/sha}","git_commits_url":"https://api.github.com/repos/n8sh/druntime/git/commits{/sha}","comments_url":"https://api.github.com/repos/n8sh/druntime/comments{/number}","issue_comment_url":"https://api.github.com/repos/n8sh/druntime/issues/comments{/number}","contents_url":"https://api.github.com/repos/n8sh/druntime/contents/{+path}","compare_url":"https://api.github.com/repos/n8sh/druntime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/n8sh/druntime/merges","archive_url":"https://api.github.com/repos/n8sh/druntime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/n8sh/druntime/downloads","issues_url":"https://api.github.com/repos/n8sh/druntime/issues{/number}","pulls_url":"https://api.github.com/repos/n8sh/druntime/pulls{/number}","milestones_url":"https://api.github.com/repos/n8sh/druntime/milestones{/number}","notifications_url":"https://api.github.com/repos/n8sh/druntime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/n8sh/druntime/labels{/name}","releases_url":"https://api.github.com/repos/n8sh/druntime/releases{/id}","deployments_url":"https://api.github.com/repos/n8sh/druntime/deployments","created_at":"2017-12-01T18:16:46Z","updated_at":"2018-05-31T07:51:39Z","pushed_at":"2018-05-31T11:22:44Z","git_url":"git://github.com/n8sh/druntime.git","ssh_url":"git@github.com:n8sh/druntime.git","clone_url":"https://github.com/n8sh/druntime.git","svn_url":"https://github.com/n8sh/druntime","homepage":"dlang.org","size":15052,"stargazers_count":0,"watchers_count":0,"language":"D","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":"bsl-1.0","name":"Boost Software License 1.0","spdx_id":"BSL-1.0","url":"https://api.github.com/licenses/bsl-1.0","node_id":"MDc6TGljZW5zZTI4"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dlang:master","ref":"master","sha":"335cd2e44c230a170394cbebb5269beba0eb4964","user":{"login":"dlang","id":565913,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NTkxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/565913?v=4","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"repo":{"id":1257087,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU3MDg3","name":"druntime","full_name":"dlang/druntime","owner":{"login":"dlang","id":565913,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NTkxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/565913?v=4","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dlang/druntime","description":"Low level runtime library for the D programming language","fork":false,"url":"https://api.github.com/repos/dlang/druntime","forks_url":"https://api.github.com/repos/dlang/druntime/forks","keys_url":"https://api.github.com/repos/dlang/druntime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlang/druntime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlang/druntime/teams","hooks_url":"https://api.github.com/repos/dlang/druntime/hooks","issue_events_url":"https://api.github.com/repos/dlang/druntime/issues/events{/number}","events_url":"https://api.github.com/repos/dlang/druntime/events","assignees_url":"https://api.github.com/repos/dlang/druntime/assignees{/user}","branches_url":"https://api.github.com/repos/dlang/druntime/branches{/branch}","tags_url":"https://api.github.com/repos/dlang/druntime/tags","blobs_url":"https://api.github.com/repos/dlang/druntime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlang/druntime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlang/druntime/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlang/druntime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlang/druntime/statuses/{sha}","languages_url":"https://api.github.com/repos/dlang/druntime/languages","stargazers_url":"https://api.github.com/repos/dlang/druntime/stargazers","contributors_url":"https://api.github.com/repos/dlang/druntime/contributors","subscribers_url":"https://api.github.com/repos/dlang/druntime/subscribers","subscription_url":"https://api.github.com/repos/dlang/druntime/subscription","commits_url":"https://api.github.com/repos/dlang/druntime/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlang/druntime/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlang/druntime/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlang/druntime/issues/comments{/number}","contents_url":"https://api.github.com/repos/dlang/druntime/contents/{+path}","compare_url":"https://api.github.com/repos/dlang/druntime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlang/druntime/merges","archive_url":"https://api.github.com/repos/dlang/druntime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlang/druntime/downloads","issues_url":"https://api.github.com/repos/dlang/druntime/issues{/number}","pulls_url":"https://api.github.com/repos/dlang/druntime/pulls{/number}","milestones_url":"https://api.github.com/repos/dlang/druntime/milestones{/number}","notifications_url":"https://api.github.com/repos/dlang/druntime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlang/druntime/labels{/name}","releases_url":"https://api.github.com/repos/dlang/druntime/releases{/id}","deployments_url":"https://api.github.com/repos/dlang/druntime/deployments","created_at":"2011-01-15T07:01:38Z","updated_at":"2018-05-31T05:11:49Z","pushed_at":"2018-05-31T11:22:45Z","git_url":"git://github.com/dlang/druntime.git","ssh_url":"git@github.com:dlang/druntime.git","clone_url":"https://github.com/dlang/druntime.git","svn_url":"https://github.com/dlang/druntime","homepage":"dlang.org","size":15060,"stargazers_count":481,"watchers_count":481,"language":"D","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":332,"mirror_url":null,"archived":false,"open_issues_count":74,"license":{"key":"bsl-1.0","name":"Boost Software License 1.0","spdx_id":"BSL-1.0","url":"https://api.github.com/licenses/bsl-1.0","node_id":"MDc6TGljZW5zZTI4"},"forks":332,"open_issues":74,"watchers":481,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dlang/druntime/pulls/2200"},"html":{"href":"https://github.com/dlang/druntime/pull/2200"},"issue":{"href":"https://api.github.com/repos/dlang/druntime/issues/2200"},"comments":{"href":"https://api.github.com/repos/dlang/druntime/issues/2200/comments"},"review_comments":{"href":"https://api.github.com/repos/dlang/druntime/pulls/2200/comments"},"review_comment":{"href":"https://api.github.com/repos/dlang/druntime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dlang/druntime/pulls/2200/commits"},"statuses":{"href":"https://api.github.com/repos/dlang/druntime/statuses/deda34fd7736e87f22d5c0e42d72a5c750cf3193"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"n8sh"}}