{"action":"closed","number":1085,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1085","id":33915014,"html_url":"https://github.com/rust-lang/rfcs/pull/1085","diff_url":"https://github.com/rust-lang/rfcs/pull/1085.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/1085.patch","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1085","number":1085,"state":"closed","locked":false,"title":"Leak and Destructor Guarantees","user":{"login":"reem","id":4745181,"avatar_url":"https://avatars.githubusercontent.com/u/4745181?v=3","gravatar_id":"","url":"https://api.github.com/users/reem","html_url":"https://github.com/reem","followers_url":"https://api.github.com/users/reem/followers","following_url":"https://api.github.com/users/reem/following{/other_user}","gists_url":"https://api.github.com/users/reem/gists{/gist_id}","starred_url":"https://api.github.com/users/reem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reem/subscriptions","organizations_url":"https://api.github.com/users/reem/orgs","repos_url":"https://api.github.com/users/reem/repos","events_url":"https://api.github.com/users/reem/events{/privacy}","received_events_url":"https://api.github.com/users/reem/received_events","type":"User","site_admin":false},"body":"Add a new default unsafe trait, `Leak`. If a type does not implement `Leak` it can be\r\nmemory unsafe to fail to run the destructor of this type and continue execution of the\r\nprogram past this types lifetime.\r\n\r\nAdditionally, cause all panics in destructors to immediately abort the process,\r\nsolving two other notable bugs that allow leaking arbitrary data.\r\n\r\nAdd a safe variant of `mem::forget` (e.g. `mem::leak`) which requires `Leak`.\r\nThe existing `mem::forget` remains unbounded, but `unsafe`.\r\n\r\nThis proposal also requires a slight breaking change to a few `std` APIs to add\r\n`Leak` bounds where none exist currently. This is unfortunate so close to 1.0,\r\nbut in the author's opinion is better than dedicating to a safe unbounded `mem::forget`\r\nforever.\r\n\r\nThis RFC is largely an alternative to RFC PR 1066, which makes an unbounded `mem::forget`\r\nsafe.\r\n\r\nEDIT: An implementation of Leak, including std and compiler changes, can be found here: https://github.com/reem/rust/tree/leak","created_at":"2015-04-23T00:39:21Z","updated_at":"2015-05-07T17:18:59Z","closed_at":"2015-05-07T17:18:59Z","merged_at":null,"merge_commit_sha":"e8b5ea1e3b0e310eeece55eabfbdfe1e61114327","assignee":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1085/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1085/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1085/comments","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/93bd5f60f127765b8c2234e817a2855c28e15588","head":{"label":"reem:destructor-guarantees","ref":"destructor-guarantees","sha":"93bd5f60f127765b8c2234e817a2855c28e15588","user":{"login":"reem","id":4745181,"avatar_url":"https://avatars.githubusercontent.com/u/4745181?v=3","gravatar_id":"","url":"https://api.github.com/users/reem","html_url":"https://github.com/reem","followers_url":"https://api.github.com/users/reem/followers","following_url":"https://api.github.com/users/reem/following{/other_user}","gists_url":"https://api.github.com/users/reem/gists{/gist_id}","starred_url":"https://api.github.com/users/reem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reem/subscriptions","organizations_url":"https://api.github.com/users/reem/orgs","repos_url":"https://api.github.com/users/reem/repos","events_url":"https://api.github.com/users/reem/events{/privacy}","received_events_url":"https://api.github.com/users/reem/received_events","type":"User","site_admin":false},"repo":{"id":23845260,"name":"rfcs","full_name":"reem/rfcs","owner":{"login":"reem","id":4745181,"avatar_url":"https://avatars.githubusercontent.com/u/4745181?v=3","gravatar_id":"","url":"https://api.github.com/users/reem","html_url":"https://github.com/reem","followers_url":"https://api.github.com/users/reem/followers","following_url":"https://api.github.com/users/reem/following{/other_user}","gists_url":"https://api.github.com/users/reem/gists{/gist_id}","starred_url":"https://api.github.com/users/reem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reem/subscriptions","organizations_url":"https://api.github.com/users/reem/orgs","repos_url":"https://api.github.com/users/reem/repos","events_url":"https://api.github.com/users/reem/events{/privacy}","received_events_url":"https://api.github.com/users/reem/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/reem/rfcs","description":"RFCs for changes to Rust","fork":true,"url":"https://api.github.com/repos/reem/rfcs","forks_url":"https://api.github.com/repos/reem/rfcs/forks","keys_url":"https://api.github.com/repos/reem/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reem/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reem/rfcs/teams","hooks_url":"https://api.github.com/repos/reem/rfcs/hooks","issue_events_url":"https://api.github.com/repos/reem/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/reem/rfcs/events","assignees_url":"https://api.github.com/repos/reem/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/reem/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/reem/rfcs/tags","blobs_url":"https://api.github.com/repos/reem/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reem/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reem/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/reem/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reem/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/reem/rfcs/languages","stargazers_url":"https://api.github.com/repos/reem/rfcs/stargazers","contributors_url":"https://api.github.com/repos/reem/rfcs/contributors","subscribers_url":"https://api.github.com/repos/reem/rfcs/subscribers","subscription_url":"https://api.github.com/repos/reem/rfcs/subscription","commits_url":"https://api.github.com/repos/reem/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/reem/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/reem/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/reem/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/reem/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/reem/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reem/rfcs/merges","archive_url":"https://api.github.com/repos/reem/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reem/rfcs/downloads","issues_url":"https://api.github.com/repos/reem/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/reem/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/reem/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/reem/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reem/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/reem/rfcs/releases{/id}","created_at":"2014-09-09T18:24:11Z","updated_at":"2014-09-08T12:53:48Z","pushed_at":"2015-04-23T00:56:44Z","git_url":"git://github.com/reem/rfcs.git","ssh_url":"git@github.com:reem/rfcs.git","clone_url":"https://github.com/reem/rfcs.git","svn_url":"https://github.com/reem/rfcs","homepage":"","size":1883,"stargazers_count":0,"watchers_count":0,"language":null,"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":"b75b8c781ba592c13b3785c251947acc9ed5eac0","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":17527989,"name":"rfcs","full_name":"rust-lang/rfcs","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/rfcs","description":"RFCs for changes to Rust","fork":false,"url":"https://api.github.com/repos/rust-lang/rfcs","forks_url":"https://api.github.com/repos/rust-lang/rfcs/forks","keys_url":"https://api.github.com/repos/rust-lang/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rfcs/teams","hooks_url":"https://api.github.com/repos/rust-lang/rfcs/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rfcs/events","assignees_url":"https://api.github.com/repos/rust-lang/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rfcs/tags","blobs_url":"https://api.github.com/repos/rust-lang/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rfcs/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rfcs/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rfcs/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rfcs/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rfcs/subscription","commits_url":"https://api.github.com/repos/rust-lang/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rfcs/merges","archive_url":"https://api.github.com/repos/rust-lang/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rfcs/downloads","issues_url":"https://api.github.com/repos/rust-lang/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rfcs/releases{/id}","created_at":"2014-03-07T21:29:00Z","updated_at":"2015-05-07T15:12:10Z","pushed_at":"2015-05-07T17:12:09Z","git_url":"git://github.com/rust-lang/rfcs.git","ssh_url":"git@github.com:rust-lang/rfcs.git","clone_url":"https://github.com/rust-lang/rfcs.git","svn_url":"https://github.com/rust-lang/rfcs","homepage":"","size":11289,"stargazers_count":333,"watchers_count":333,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":199,"mirror_url":null,"open_issues_count":506,"forks":199,"open_issues":506,"watchers":333,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/1085"},"html":{"href":"https://github.com/rust-lang/rfcs/pull/1085"},"issue":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/1085"},"comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/1085/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/1085/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/1085/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rfcs/statuses/93bd5f60f127765b8c2234e817a2855c28e15588"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":46,"review_comments":24,"commits":3,"additions":180,"deletions":0,"changed_files":1}}