Created
March 19, 2018 08:08
-
-
Save badboy/47afbbb081e45c92853d79bfb0bdaa57 to your computer and use it in GitHub Desktop.
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
#![feature(termination_trait,termination_trait_lib)] | |
use std::process::Termination; | |
struct Exit(i32); | |
impl Termination for Exit { | |
fn report(self) -> i32 { | |
self.0 | |
} | |
} | |
fn main() -> Exit { | |
Exit(42) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment