{"action":"created","issue":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1181","labels_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1181/labels{/name}","comments_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1181/comments","events_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1181/events","html_url":"https://github.com/D-Programming-Language/druntime/pull/1181","id":59128438,"number":1181,"title":"Make .destroy() work with attribute inference","user":{"login":"JakobOvrum","id":155856,"avatar_url":"https://avatars.githubusercontent.com/u/155856?v=3","gravatar_id":"","url":"https://api.github.com/users/JakobOvrum","html_url":"https://github.com/JakobOvrum","followers_url":"https://api.github.com/users/JakobOvrum/followers","following_url":"https://api.github.com/users/JakobOvrum/following{/other_user}","gists_url":"https://api.github.com/users/JakobOvrum/gists{/gist_id}","starred_url":"https://api.github.com/users/JakobOvrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakobOvrum/subscriptions","organizations_url":"https://api.github.com/users/JakobOvrum/orgs","repos_url":"https://api.github.com/users/JakobOvrum/repos","events_url":"https://api.github.com/users/JakobOvrum/events{/privacy}","received_events_url":"https://api.github.com/users/JakobOvrum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-26T19:29:26Z","updated_at":"2015-03-02T20:36:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1181","html_url":"https://github.com/D-Programming-Language/druntime/pull/1181","diff_url":"https://github.com/D-Programming-Language/druntime/pull/1181.diff","patch_url":"https://github.com/D-Programming-Language/druntime/pull/1181.patch"},"body":"Discussed in [this thread](http://forum.dlang.org/thread/krccldftrbbczahasvbi@forum.dlang.org).\r\n\r\nWith this patch, the `@safe`ty etc. of object.destroy depends on the destructor of the struct.\r\n\r\nAlso adds `postblitRecurse` to enable explicit copying with attribute inference, to be used in `emplace`.\r\n\r\nAttribute inference for destruction/postblit of fixed-length arrays with struct elements seems to be broken even for implicit/in-built destruction/postblit, so that needs to be fixed in the compiler before it's tackled here.\r\n\r\nThis impacts attribute inference in a couple of key Phobos building blocks, such as `emplace` and the `Array` container. Grepping for `malloc` tends to be a good way to find code that uses explicit destruction.\r\n\r\nI plan to file one or more dependent Phobos PRs to leverage this.\r\n"},"comment":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/comments/76813417","html_url":"https://github.com/D-Programming-Language/druntime/pull/1181#issuecomment-76813417","issue_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1181","id":76813417,"user":{"login":"schveiguy","id":580778,"avatar_url":"https://avatars.githubusercontent.com/u/580778?v=3","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},"created_at":"2015-03-02T20:36:06Z","updated_at":"2015-03-02T20:36:06Z","body":"OK, I like how traits moved to core.internal. I see nothing wrong with this, and it's easy to fix once the compiler exposes its function (or maybe the compiler should CALL this function?).\r\n\r\nLGTM."}}