{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/54751","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/54751/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/54751/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/54751/events","html_url":"https://github.com/rust-lang/rust/issues/54751","id":365895575,"node_id":"MDU6SXNzdWUzNjU4OTU1NzU=","number":54751,"title":"Const sanity checks skips uninhabited arrays","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-02T13:23:46Z","updated_at":"2018-10-02T13:51:29Z","closed_at":null,"author_association":"MEMBER","body":"The following should be stopped by the const sanity check:\r\n```rust\r\n#![feature(never_type, const_transmute)]\r\n\r\nuse std::mem;\r\n\r\nconst TEST: [!; 1] = unsafe { mem::transmute(()) };\r\n```\r\nBut it [is not](https://play.rust-lang.org/?gist=3cba3b15ec33782d4f8a542c06b7b3b1&version=nightly&mode=debug&edition=2015).\r\n\r\nThe issue is that the sanity check calls `is_zst()` to skip arrays that could be immediate, but some of those arrays are uninhabited...\r\n\r\nCc @oli-obk "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/426281489","html_url":"https://github.com/rust-lang/rust/issues/54751#issuecomment-426281489","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/54751","id":426281489,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjI4MTQ4OQ==","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},"created_at":"2018-10-02T13:51:29Z","updated_at":"2018-10-02T13:51:29Z","author_association":"MEMBER","body":"That's just a bandaid though, WF checks won't catch the same thing wrapped in an `Option` (and `Some`)."}}
{"actor":{"display_login":"RalfJung"}}