Skip to content

Instantly share code, notes, and snippets.

@qezz
Forked from anonymous/playground.rs
Created August 3, 2015 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qezz/52d10e5ed1b92f9e6858 to your computer and use it in GitHub Desktop.
Save qezz/52d10e5ed1b92f9e6858 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
fn main() {
enum Void {}
let res: Result<u32, Void> = Ok(0);
// Err doesn't exist anymore, so Ok is actually irrefutable.
// `Void` must be covered here
let Ok(num) = res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment