{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/36011","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/36011/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/36011/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/36011/events","html_url":"https://github.com/rust-lang/rust/issues/36011","id":173454248,"number":36011,"title":"non-exhaustive patterns: type ! is non-empty","user":{"login":"Sh4rK","id":221874,"avatar_url":"https://avatars.githubusercontent.com/u/221874?v=3","gravatar_id":"","url":"https://api.github.com/users/Sh4rK","html_url":"https://github.com/Sh4rK","followers_url":"https://api.github.com/users/Sh4rK/followers","following_url":"https://api.github.com/users/Sh4rK/following{/other_user}","gists_url":"https://api.github.com/users/Sh4rK/gists{/gist_id}","starred_url":"https://api.github.com/users/Sh4rK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sh4rK/subscriptions","organizations_url":"https://api.github.com/users/Sh4rK/orgs","repos_url":"https://api.github.com/users/Sh4rK/repos","events_url":"https://api.github.com/users/Sh4rK/events{/privacy}","received_events_url":"https://api.github.com/users/Sh4rK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-26T13:34:30Z","updated_at":"2016-08-27T15:45:47Z","closed_at":null,"body":"Hi!\r\n\r\nI'm trying out `feature(never_type)` and getting an error on the simplest example possible.\r\nRustc is `rustc 1.13.0-nightly (3c5a0fa45 2016-08-22)` on `x86_64-pc-windows-msvc`.\r\n\r\nThe code:\r\n```rust\r\n#![feature(never_type)]\r\n\r\nfn main() {\r\n    let never: !;\r\n    match never {};\r\n}\r\n```\r\n\r\nAnd the error I get:\r\n```\r\nerror[E0002]: non-exhaustive patterns: type ! is non-empty\r\n --> src\\main.rs:5:5\r\n  |\r\n5 |     match never {};\r\n  |     ^^^^^^^^^^^^^^\r\n  |\r\nhelp: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.\r\n --> src\\main.rs:5:5\r\n  |\r\n5 |     match never {};\r\n  |     ^^^^^^^^^^^^^^\r\n```\r\n\r\nWhich is quite bad, as the point of `!` is that it is empty.\r\n\r\nIf I replace it with an empty enum, it works. (It errors on the uninitialized variable, but that's not the point.)"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/242924453","html_url":"https://github.com/rust-lang/rust/issues/36011#issuecomment-242924453","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/36011","id":242924453,"user":{"login":"Sh4rK","id":221874,"avatar_url":"https://avatars.githubusercontent.com/u/221874?v=3","gravatar_id":"","url":"https://api.github.com/users/Sh4rK","html_url":"https://github.com/Sh4rK","followers_url":"https://api.github.com/users/Sh4rK/followers","following_url":"https://api.github.com/users/Sh4rK/following{/other_user}","gists_url":"https://api.github.com/users/Sh4rK/gists{/gist_id}","starred_url":"https://api.github.com/users/Sh4rK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sh4rK/subscriptions","organizations_url":"https://api.github.com/users/Sh4rK/orgs","repos_url":"https://api.github.com/users/Sh4rK/repos","events_url":"https://api.github.com/users/Sh4rK/events{/privacy}","received_events_url":"https://api.github.com/users/Sh4rK/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T15:45:47Z","updated_at":"2016-08-27T15:45:47Z","body":"That seems a bit unfortunate, but I understand it might not be a trivial change.\r\n\r\nSo to safely unwrap a `Result<T, !>` for example, currently I should do something like this, or is there a better way?\r\n```rust\r\nmatch res {\r\n    Ok(v) => v,\r\n    Err(e) => e,\r\n}\r\n```"}}
{"actor":{"display_login":"Sh4rK"}}