Created
October 13, 2019 09:50
-
-
Save FauxFaux/16a62883dea9a5f7e0f33486cdf75c06 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#![feature(process_exitcode_placeholder)] | |
#![feature(never_type)] | |
use std::process::ExitCode; | |
fn app() -> Result<!, ()> { | |
Err(()) | |
} | |
fn main() -> ExitCode { | |
if app().is_err() { | |
ExitCode::FAILURE | |
} else { | |
ExitCode::SUCCESS | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment