Skip to content

Instantly share code, notes, and snippets.

Created August 3, 2015 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/518a69e35a09de0bfec4 to your computer and use it in GitHub Desktop.
Save anonymous/518a69e35a09de0bfec4 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