{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/277000652","pull_request_review_id":228710343,"id":277000652,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3NzAwMDY1Mg==","diff_hunk":"@@ -355,21 +339,14 @@ impl<T: ?Sized> Mutex<T> {\n     pub fn get_mut(&mut self) -> LockResult<&mut T> {\n         // We know statically that there are no other references to `self`, so\n         // there's no need to lock the inner mutex.\n-        let data = unsafe { &mut *self.data.get() };\n+        let data = self.inner.get_mut();\n         poison::map_result(self.poison.borrow(), |_| data )\n     }\n }\n \n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n unsafe impl<#[may_dangle] T: ?Sized> Drop for Mutex<T> {\n-    fn drop(&mut self) {\n-        // This is actually safe b/c we know that there is no further usage of\n-        // this mutex (it's up to the user to arrange for a mutex to get\n-        // dropped, that's not our job)\n-        //\n-        // IMPORTANT: This code must be kept in sync with `Mutex::into_inner`.\n-        unsafe { self.inner.destroy() }\n-    }\n+    fn drop(&mut self) {}","path":"src/libstd/sync/mutex.rs","position":126,"original_position":126,"commit_id":"f40a4ec81020a6e29823f5be0a51b37616b1a138","original_commit_id":"c276a9b0a96348f2aecafcf572787ca201d51394","user":{"login":"RalfJung","id":330628,"node_id":"MDQ6VXNlcjMzMDYyOA==","avatar_url":"https://avatars1.githubusercontent.com/u/330628?v=4","gravatar_id":"","url":"https://api.github.com/users/RalfJung","html_url":"https://github.com/RalfJung","followers_url":"https://api.github.com/users/RalfJung/followers","following_url":"https://api.github.com/users/RalfJung/following{/other_user}","gists_url":"https://api.github.com/users/RalfJung/gists{/gist_id}","starred_url":"https://api.github.com/users/RalfJung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RalfJung/subscriptions","organizations_url":"https://api.github.com/users/RalfJung/orgs","repos_url":"https://api.github.com/users/RalfJung/repos","events_url":"https://api.github.com/users/RalfJung/events{/privacy}","received_events_url":"https://api.github.com/users/RalfJung/received_events","type":"User","site_admin":false},"body":"Hm, fair, let's leave that for later. The behavior of `Drop` trait bounds might be changed.","created_at":"2019-04-19T14:30:02Z","updated_at":"2019-04-19T14:30:02Z","html_url":"https://github.com/rust-lang/rust/pull/56410#discussion_r277000652","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/56410","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/277000652"},"html":{"href":"https://github.com/rust-lang/rust/pull/56410#discussion_r277000652"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/56410"}},"in_reply_to_id":276351660},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/56410","id":235198713,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MTk4NzEz","html_url":"https://github.com/rust-lang/rust/pull/56410","diff_url":"https://github.com/rust-lang/rust/pull/56410.diff","patch_url":"https://github.com/rust-lang/rust/pull/56410.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/56410","number":56410,"state":"open","locked":false,"title":"Use the parking_lot locking primitives","user":{"login":"faern","id":332294,"node_id":"MDQ6VXNlcjMzMjI5NA==","avatar_url":"https://avatars1.githubusercontent.com/u/332294?v=4","gravatar_id":"","url":"https://api.github.com/users/faern","html_url":"https://github.com/faern","followers_url":"https://api.github.com/users/faern/followers","following_url":"https://api.github.com/users/faern/following{/other_user}","gists_url":"https://api.github.com/users/faern/gists{/gist_id}","starred_url":"https://api.github.com/users/faern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faern/subscriptions","organizations_url":"https://api.github.com/users/faern/orgs","repos_url":"https://api.github.com/users/faern/repos","events_url":"https://api.github.com/users/faern/events{/privacy}","received_events_url":"https://api.github.com/users/faern/received_events","type":"User","site_admin":false},"body":"This PR adds the [`parking_lot`](https://crates.io/crates/parking_lot) code to libstd and uses it for the `sys_common::{mutex,rwlock,condvar,remutex}` implementations.\r\n\r\nThis has been discussed in https://internals.rust-lang.org/t/standard-library-synchronization-primitives-and-undefined-behavior/8439/9\r\n\r\nThanks @Amanieu for mentoring when doing this, and basically all the code is his as well of course.\r\n\r\nFixes https://github.com/rust-lang/rust/issues/35836\r\nFixes https://github.com/rust-lang/rust/issues/53127","created_at":"2018-12-01T15:15:48Z","updated_at":"2019-04-19T14:30:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd4c42786eff7e086420324e75846071852d600a","assignee":{"login":"RalfJung","id":330628,"node_id":"MDQ6VXNlcjMzMDYyOA==","avatar_url":"https://avatars1.githubusercontent.com/u/330628?v=4","gravatar_id":"","url":"https://api.github.com/users/RalfJung","html_url":"https://github.com/RalfJung","followers_url":"https://api.github.com/users/RalfJung/followers","following_url":"https://api.github.com/users/RalfJung/following{/other_user}","gists_url":"https://api.github.com/users/RalfJung/gists{/gist_id}","starred_url":"https://api.github.com/users/RalfJung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RalfJung/subscriptions","organizations_url":"https://api.github.com/users/RalfJung/orgs","repos_url":"https://api.github.com/users/RalfJung/repos","events_url":"https://api.github.com/users/RalfJung/events{/privacy}","received_events_url":"https://api.github.com/users/RalfJung/received_events","type":"User","site_admin":false},"assignees":[{"login":"RalfJung","id":330628,"node_id":"MDQ6VXNlcjMzMDYyOA==","avatar_url":"https://avatars1.githubusercontent.com/u/330628?v=4","gravatar_id":"","url":"https://api.github.com/users/RalfJung","html_url":"https://github.com/RalfJung","followers_url":"https://api.github.com/users/RalfJung/followers","following_url":"https://api.github.com/users/RalfJung/following{/other_user}","gists_url":"https://api.github.com/users/RalfJung/gists{/gist_id}","starred_url":"https://api.github.com/users/RalfJung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RalfJung/subscriptions","organizations_url":"https://api.github.com/users/RalfJung/orgs","repos_url":"https://api.github.com/users/RalfJung/repos","events_url":"https://api.github.com/users/RalfJung/events{/privacy}","received_events_url":"https://api.github.com/users/RalfJung/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":583426710,"node_id":"MDU6TGFiZWw1ODM0MjY3MTA=","url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-review","name":"S-waiting-on-review","color":"d3dddd","default":false},{"id":223796632,"node_id":"MDU6TGFiZWwyMjM3OTY2MzI=","url":"https://api.github.com/repos/rust-lang/rust/labels/relnotes","name":"relnotes","color":"fad8c7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/56410/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/56410/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/56410/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/f40a4ec81020a6e29823f5be0a51b37616b1a138","head":{"label":"faern:add-parking-lot","ref":"add-parking-lot","sha":"f40a4ec81020a6e29823f5be0a51b37616b1a138","user":{"login":"faern","id":332294,"node_id":"MDQ6VXNlcjMzMjI5NA==","avatar_url":"https://avatars1.githubusercontent.com/u/332294?v=4","gravatar_id":"","url":"https://api.github.com/users/faern","html_url":"https://github.com/faern","followers_url":"https://api.github.com/users/faern/followers","following_url":"https://api.github.com/users/faern/following{/other_user}","gists_url":"https://api.github.com/users/faern/gists{/gist_id}","starred_url":"https://api.github.com/users/faern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faern/subscriptions","organizations_url":"https://api.github.com/users/faern/orgs","repos_url":"https://api.github.com/users/faern/repos","events_url":"https://api.github.com/users/faern/events{/privacy}","received_events_url":"https://api.github.com/users/faern/received_events","type":"User","site_admin":false},"repo":{"id":92103488,"node_id":"MDEwOlJlcG9zaXRvcnk5MjEwMzQ4OA==","name":"rust","full_name":"faern/rust","private":false,"owner":{"login":"faern","id":332294,"node_id":"MDQ6VXNlcjMzMjI5NA==","avatar_url":"https://avatars1.githubusercontent.com/u/332294?v=4","gravatar_id":"","url":"https://api.github.com/users/faern","html_url":"https://github.com/faern","followers_url":"https://api.github.com/users/faern/followers","following_url":"https://api.github.com/users/faern/following{/other_user}","gists_url":"https://api.github.com/users/faern/gists{/gist_id}","starred_url":"https://api.github.com/users/faern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faern/subscriptions","organizations_url":"https://api.github.com/users/faern/orgs","repos_url":"https://api.github.com/users/faern/repos","events_url":"https://api.github.com/users/faern/events{/privacy}","received_events_url":"https://api.github.com/users/faern/received_events","type":"User","site_admin":false},"html_url":"https://github.com/faern/rust","description":"A safe, concurrent, practical language.","fork":true,"url":"https://api.github.com/repos/faern/rust","forks_url":"https://api.github.com/repos/faern/rust/forks","keys_url":"https://api.github.com/repos/faern/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faern/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faern/rust/teams","hooks_url":"https://api.github.com/repos/faern/rust/hooks","issue_events_url":"https://api.github.com/repos/faern/rust/issues/events{/number}","events_url":"https://api.github.com/repos/faern/rust/events","assignees_url":"https://api.github.com/repos/faern/rust/assignees{/user}","branches_url":"https://api.github.com/repos/faern/rust/branches{/branch}","tags_url":"https://api.github.com/repos/faern/rust/tags","blobs_url":"https://api.github.com/repos/faern/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faern/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faern/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/faern/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faern/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/faern/rust/languages","stargazers_url":"https://api.github.com/repos/faern/rust/stargazers","contributors_url":"https://api.github.com/repos/faern/rust/contributors","subscribers_url":"https://api.github.com/repos/faern/rust/subscribers","subscription_url":"https://api.github.com/repos/faern/rust/subscription","commits_url":"https://api.github.com/repos/faern/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/faern/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/faern/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/faern/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/faern/rust/contents/{+path}","compare_url":"https://api.github.com/repos/faern/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faern/rust/merges","archive_url":"https://api.github.com/repos/faern/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faern/rust/downloads","issues_url":"https://api.github.com/repos/faern/rust/issues{/number}","pulls_url":"https://api.github.com/repos/faern/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/faern/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/faern/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faern/rust/labels{/name}","releases_url":"https://api.github.com/repos/faern/rust/releases{/id}","deployments_url":"https://api.github.com/repos/faern/rust/deployments","created_at":"2017-05-22T22:04:23Z","updated_at":"2018-12-14T17:16:28Z","pushed_at":"2019-04-18T16:58:22Z","git_url":"git://github.com/faern/rust.git","ssh_url":"git@github.com:faern/rust.git","clone_url":"https://github.com/faern/rust.git","svn_url":"https://github.com/faern/rust","homepage":"https://www.rust-lang.org","size":426555,"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,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"ee621f42329069c296b4c2066b3743cc4ff0f369","user":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","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,"node_id":"MDEwOlJlcG9zaXRvcnk3MjQ3MTI=","name":"rust","full_name":"rust-lang/rust","private":false,"owner":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","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},"html_url":"https://github.com/rust-lang/rust","description":"Empowering everyone to build reliable and efficient software.","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":"2019-04-19T13:07:58Z","pushed_at":"2019-04-19T13:54:40Z","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":430312,"stargazers_count":35549,"watchers_count":35549,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5648,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4816,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5648,"open_issues":4816,"watchers":35549,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/56410"},"html":{"href":"https://github.com/rust-lang/rust/pull/56410"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/56410"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/56410/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/56410/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/56410/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/f40a4ec81020a6e29823f5be0a51b37616b1a138"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"RalfJung"}}