{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/19063","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/19063/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/19063/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/19063/events","html_url":"https://github.com/rust-lang/rust/issues/19063","id":49187594,"number":19063,"title":"mem::{size,align,min_align}_of_val should accept DSTs","user":{"login":"P1start","id":2055302,"avatar_url":"https://avatars.githubusercontent.com/u/2055302?v=3","gravatar_id":"","url":"https://api.github.com/users/P1start","html_url":"https://github.com/P1start","followers_url":"https://api.github.com/users/P1start/followers","following_url":"https://api.github.com/users/P1start/following{/other_user}","gists_url":"https://api.github.com/users/P1start/gists{/gist_id}","starred_url":"https://api.github.com/users/P1start/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/P1start/subscriptions","organizations_url":"https://api.github.com/users/P1start/orgs","repos_url":"https://api.github.com/users/P1start/repos","events_url":"https://api.github.com/users/P1start/events{/privacy}","received_events_url":"https://api.github.com/users/P1start/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-dst","name":"A-dst","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-11-18T06:45:11Z","updated_at":"2015-11-23T23:09:20Z","closed_at":"2015-11-23T23:09:20Z","body":"Currently, `mem::size_of_val` and friends only support sized types, and just defer to `mem::size_of` etc.. Ideally, they would also support dynamically-sized types, in a way such that `size_of_val(&[1, 2, 3]: &[int]) == size_of::<int>() * 3`. Because this requires an actual value, they wouldn’t be able to simply defer to calling `size_of` etc. and would instead have to become intrinsic functions. I believe that this issue makes implementing pointer types that accept dynamically-sized type parameters very difficult (if not impossible) (e.g., #18248 (although I think that also might require a way of running destructors for unsized values))."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/159096756","html_url":"https://github.com/rust-lang/rust/issues/19063#issuecomment-159096756","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/19063","id":159096756,"user":{"login":"bluss","id":3209739,"avatar_url":"https://avatars.githubusercontent.com/u/3209739?v=3","gravatar_id":"","url":"https://api.github.com/users/bluss","html_url":"https://github.com/bluss","followers_url":"https://api.github.com/users/bluss/followers","following_url":"https://api.github.com/users/bluss/following{/other_user}","gists_url":"https://api.github.com/users/bluss/gists{/gist_id}","starred_url":"https://api.github.com/users/bluss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluss/subscriptions","organizations_url":"https://api.github.com/users/bluss/orgs","repos_url":"https://api.github.com/users/bluss/repos","events_url":"https://api.github.com/users/bluss/events{/privacy}","received_events_url":"https://api.github.com/users/bluss/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T23:09:20Z","updated_at":"2015-11-23T23:09:20Z","body":"This is fixed -- because align_of_val now is minimum alignment."}}