-
-
Save qezz/52d10e5ed1b92f9e6858 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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